Calculator Guide

Finance

Finance functions cover interest, growth, loans, annuities, returns, and common business calculations.

simple interest(10000, 5%, 2 years)
compound interest(1000, 12%, 24 months, 12)
emi(500000, 6.5%, 30 years)
cagr(1000, 2000, 10 years)

Argument conventions

Finance functions use parentheses and comma-separated arguments.

ArgumentHow to write it
Rate5% or 5; both mean five percent
Term / time2 years, 18 months, 30 years 12 months, or bare years
Compounding frequencyA bare number of periods per year, such as 12 for monthly
MoneyCurrency symbols are ignored, so $10000 and 10000 are equivalent

Rates are percentage values. Write 5% or 5 for five percent. Do not write 0.05 unless you mean 0.05%.

Interest and growth

FunctionDescriptionExample
simple interest(p, r, t)Interest onlysimple interest(10000, 5%, 2 years)
compound interest(p, r, t, n)Compound interest earnedcompound interest(1000, 10%, 2 years)
future value(p, r, t, n)Principal plus compound growthfuture value(1000, 10%, 2 years)
present value(fv, r, t, n)Present value of a future amountpresent value(1210, 10%, 2 years)
cagr(start, end, t)Compound annual growth ratecagr(1000, 2000, 10 years)

The compounding frequency is optional for compound functions. If you omit it, Hissab compounds annually.

compound interest(1000, 10%, 2 years)
compound interest(1000, 12%, 24 months, 12)
future value(1000, 10%, 2 years)
present value(1210, 10%, 2 years)
cagr(50000, 75000, 5 years)

Loans and mortgage

emi, mortgage, and loan payment calculate the monthly payment for an amortizing loan.

emi(500000, 6.5%, 30 years)
mortgage(500000, 6.5%, 30 years)
loan interest(100000, 12%, 1 year)

Use loan interest when you need the total interest paid over the life of the loan.

Annuities

Annuity functions work with equal payments made each period.

future value annuity(1000, 10%, 3 years)
present value annuity(500, 8%, 10 years, 12)

Returns and business math

FunctionDescriptionExample
roi(initial, final)Return on investmentroi(1000, 1500)
apy(rate, frequency)Effective annual yieldapy(12%, 12)
profit margin(revenue, cost)Profit as a percent of revenueprofit margin(200, 150)
markup(cost, price)Markup over costmarkup(150, 200)
break even(fixed, price, variable)Units needed to break evenbreak even(10000, 50, 30)
runway(cash, burn)Months of cash runwayrunway(100000, 8000)
doubling time(rate)Rule-of-72 estimate in yearsdoubling time(8%)
roi(1000, 1500)
apy(12%, 12)
profit margin(200, 150)
markup(150, 200)
break even(10000, 50, 30)
runway(2000000, 150000)
doubling time(8%)

Consumer

Everyday money math for tips, discounts, and tax.

FunctionDescriptionExample
tip(bill, rate)Tip amounttip(80, 18%)
tip total(bill, rate)Bill including the tiptip total(80, 18%)
discount(price, rate)Sale price after a discount (alias sale price)discount(200, 25%)
sales tax(price, rate)Tax on a pricesales tax(100, 8%)
price with tax(price, rate)Price including taxprice with tax(100, 8%)
tip(80, 18%)
tip total(80, 18%)
discount(200, 25%)
sales tax(100, 8%)
price with tax(100, 8%)

Investment appraisal

FunctionDescriptionExample
npv(rate, cf0, cf1, ...)Net present value of a cashflow series; the first cashflow is at t = 0npv(10%, -1000, 500, 500, 500)
irr(cf0, cf1, ...)Internal rate of return, as a percentirr(-1000, 500, 500, 500)
depreciation(cost, salvage, life)Straight-line depreciation per yeardepreciation(10000, 1000, 5)

irr needs at least one negative and one positive cashflow (a sign change). life may be a bare number of years or carry the years unit.

npv(10%, -1000, 500, 500, 500)
irr(-1000, 500, 500, 500)
depreciation(10000, 1000, 5)
depreciation(10000, 1000, 5 years)

Return values

  • Amount functions return money-like numbers: simple interest, compound interest, future value, present value, emi, loan interest, and the annuity functions.
  • Rate functions return percentage values: cagr, roi, apy, profit margin, and markup.
  • break even returns units. runway returns months. doubling time returns years.
  • Consumer and investment functions return money (tip, tip total, discount, sales tax, price with tax, npv, depreciation); irr returns a percentage.

To get principal plus simple interest, add the principal yourself.

10000 + simple interest(10000, 5%, 2 years)

Common mistakes

  • simple interest(10000, 0.05, 2 years) reads the rate as 0.05%, not 5%. Use simple interest(10000, 5%, 2 years).
  • rule of 72(8%) is invalid because function names cannot contain digits. Use doubling time(8%).
  • compound interest(1000, 10%, 5) uses five years and annual compounding. Add a frequency, such as compound interest(1000, 10%, 5 years, 12), for monthly compounding.