financialcalculators
v1.0.1
Published
NPM Module that contains all basic financial calculators.
Downloads
3
Maintainers
Readme
Installation
npm i financialcalculators
Usage
const calc = require('financialcalculators')
const result = calc.sipCalculator(1000,12,5);
console.log(result);
OR
const {sipCalculator} = require('financialcalculators')
const result = sipCalculator(1000,12,5);
console.log(result);
Terminologies
- p - principal amount
- r - rate of interest per annum
- n - number of years
- cf (optional), (defalut value - 1) - compound frequency (1(yearly)/2(half-yearly)/4(quarterly)/12(monthly))
- df (optional),(defalut value - 12) - depositing frequency (1(yearly)/2(half-yearly)/4(quarterly)/12(monthly))
- inv[] - array of invested amount upto n years
- totalVal[] - array of final corpus amount upto n years
- time[] - array of n/12 upto n years
- returns - total interest gained
- sipAmount - sip amount required
- lumpsumAmount - lumpsum amount required
- duration - duration required in years
- fv - future value
- wpm - withdrawals per month
What it contains
- sipCalculator(p,r,n,cf) returns an object {inv[], totalVal[], returns, time[]}
- lumpsumCalculator(p,r,n,cf) returns an object {inv[], totalVal[], returns, time[]}
- goalSipCalculator(fv,r,n) returns an object {inv[], totalVal[], returns, time[], sipAmount}
- goalLumpsumCalculator(fv,r,n) returns an object {inv[], totalVal[], returns, time[], lumpsumAmount}
- timeDurationSip(fv,r,p) returns an object {inv[], totalVal[], returns, time[], duration}
- timeDurationLumpsum(fv,r,p) returns an object {inv[], totalVal[], returns, time[], duration}
- swpCalculator(p,wpm,r,n) returns an object {startingBal[], endingBal[], time[]}
- ssyCalculator(p,r)[Sukanya Samriddhi Yojna] returns an object {inv[], totalVal[],returns, time[]}
- investmentPlanner(salary,age,investmentValue) returns an object {idealInvestment, deficit, equityAmount, debtAmount}
- cagrReturnCalculator(initialValue,endingValue,period) returns CAGR value in percentage
- absoluteReturnCalculator(initialValue,endingValue) returns Absolute returns value in percentage
- emiCalculator(p,r,n) returns an object {emi, totalInterest, totalPayment}
- gstExclusiveCalculator(amount,gstRate) returns an object {gst, postGSTAmount}
- gstInclusiveCalculator(amount,gstRate) returns an object {gst, preGSTAmount}
- inflationFutureValueCalculator(p,r,n) returns future value of inflation
- inflationRateCalculator(p,r,n) returns rate of inflation
- ruleOf72(rateOfInterest) returns duration in years
- ppfCalculator(p,r,n,df) returns an object {inv[], totalVal[], returns, time[]}
- liquidityRatio(assets, debt) returns liquidity ratio
- budgetCalculator(salary) returns an object {needs, wants, investment}
- simpleInterestCalculator(p,r,n) returns an object {inv[], totalVal[], returns, time[]}
- compundInterestCalculator(lumpsumAmt,sipAmt,r,n,cf,df) returns an object {sipResult[], lumpsumResult[], totalInvested, totalReturns, totalFutureValue}
- retirementCalculator(currentAge,retirementAge,lifeExpectancy,r,annualExpense,inflationRate) returns an object {inv[], totalVal[], returns, time[], sipAmount, corpus, annulaExpenseWithInflation}
- fdCalculator(p,r,n,cf) returns an object {inv[], totalVal[], returns, time[]}
- rdCalculator(p,r,n) returns an object {inv[], totalVal[], returns, time[]}
- childEducationCalculator(currentAge,higherEducationAge,r,presentCostOfEducation,inflationRate) returns an object {inv[], totalVal[], returns, time[], sipAmount}