Swift EMI Calculator


Interest Rate
Tenure (in months)

Loan EMI


Total Interest Payable


Total Amount


Sure! I can help you with a Swift code snippet to calculate the Equated Monthly Installment (EMI) for a loan. Here’s an example:

In the code snippet above, we define a function calculateEMI that takes three parameters: principal (loan amount), interestRate (annual interest rate), and tenure (loan tenure in years). The function calculates the EMI using the standard formula for EMI calculation.

We then provide an example usage of the function with some sample values for loanPrincipal, loanInterestRate, and loanTenure. The calculated EMI is printed to the console.

Please note that the interest rate should be in percentage, and the tenure should be in years. The result will be the EMI amount per month.