# Internal Rate of Return


```` javascript
import getXIRR from 'xirr-calculator';

//EMI AMOUNT per month
const emiAmount = 1000 

//TOTAL MONTHS
const n = 12 

//FINAL AMOUNT
const finalAmount = 1347

const rate = getXIRR(emiAmount, n, finalAmount);

console.log(rate);  // Prints 15.37 (Anual)
````