Methodology
Finance methodology
The math behind the Finance cluster, derivation by derivation.
Five tools sit under Convertitive’s Finance pillar today: mortgage, compound interest, tip, sales tax, and discount. All five are pure-math, closed-form calculations — no proprietary adjustments, no marketing wrapper, no fetch to a remote rate service.
This page walks through the formula behind each one so you can (a) reproduce the result by hand, and (b) cite the calculation anywhere it needs to be defensible.
Mortgage — the standard amortising-loan formula
A fixed-rate mortgage’s monthly payment is the unique value that, when applied each month for the full term, drives the loan balance to zero. The closed form is:
M = P · r / (1 − (1 + r)^−n)Where P is the loan principal (home price minus down payment), r is the monthly interest rate (annual APR ÷ 12, expressed as a decimal), and n is the total number of monthly payments (years × 12).
Derivation
The formula is just the present-value-of-an-annuity equation solved for the monthly payment. The present value of n equal payments of M at monthly rate r is M · (1 − (1 + r)^−n) / r. Setting this equal to the principal P and solving for M gives the formula above.
Edge cases
- Zero interest rate. The formula has a 0/0 limit at
r = 0. We handle it explicitly: at 0% APR, monthly payment is simplyP / n. - Decimal months. The formula uses integer
n. We round years × 12 to the nearest integer before evaluating.
What’s not included
Property tax, homeowner’s insurance, HOA dues, and PMI. These are all real components of a homeowner’s monthly outlay (the “PITI”), but they vary by jurisdiction, property, and lender. Adding them would force the calculator to either ask 8 more questions up front or guess. We chose to return just principal + interest so the math stays auditable.
Compound interest — future value with periodic contributions
Compound interest is the textbook future-value formula with contributions. At principal P, annual rate R (percent), compounding k times per year for t years, with contribution C at the end of each compounding period:
FV = P · (1 + r)^n + C · ((1 + r)^n − 1) / rWhere r = R/100/k and n = k · t. At r = 0 the formula degenerates to FV = P + C · n; we handle that case explicitly.
Contribution timing convention
Contributions are assumed to land at the end of each period (the ordinary-annuity convention). Beginning-of-period contributions earn one extra period of growth; the difference is small at monthly compounding but becomes meaningful at annual frequencies over long horizons. If you need beginning-of-period math, multiply our result by (1 + r).
Tip — straightforward addition
The tip calculator handles three numbers — bill, tip percent, optional tax percent — and one denominator, group size. The formula is:
total = bill · (1 + tip%/100 + tax%/100)per_person = total / max(1, group_size)
US tipping etiquette is to apply the tip percent to the pre-tax bill, so we default the tax field to zero and leave it as a separate input. If your jurisdiction treats tax as part of the tippable amount, multiply the tip by (1 + tax) mentally.
Sales tax — and the trap with reversing it
Adding tax is grade-school arithmetic. Reversing it trips people up because the percent is applied to the pre-tax base, not the total. Given total T and tax rate x (as a decimal):
pretax = T / (1 + x)Common mistake: computing T − T·x. That uses the wrong base and under-estimates the pre-tax amount by T · x². At 8% tax that’s a 0.64% error on the pre-tax figure — small but enough to be wrong on an expense report.
Discount stacking — multiplicative, not additive
Stacked discounts apply to the running price, not the original. Given a list of percent discounts d₁, d₂, …, dₙ each in decimal form, the effective combined discount is:
d_eff = 1 − (1 − d₁)(1 − d₂)…(1 − dₙ)So 20% off followed by 10% off is 1 − 0.80 · 0.90 = 0.28, an effective 28% — not the 30% naive addition would suggest. Order doesn’t affect the result because multiplication is commutative.
Precision policy
Every Finance computation uses JavaScript’s native IEEE 754 double precision. That gives roughly 15-17 significant digits, more than enough for any realistic personal-finance scenario. Output is rounded to two decimal places for display because money is denominated in cents.
We do not use BigInt or arbitrary-precision libraries here. The Crypto cluster does (see /methodology/crypto/ when it ships) because crypto amounts can exceed 18 digits, but Finance amounts cannot in any reasonable use case.
Sources we drew on
- The mortgage formula is the standard PMT function used by Microsoft Excel, LibreOffice Calc, and every retail-banking textbook. It’s not proprietary to any institution; it predates electronic computing entirely.
- Compound interest is the present-value-of-an-annuity formula covered in any first-year finance text. The contribution- inclusive form is sometimes called the “sinking fund” formula in older literature.
- US tipping ranges are drawn from a 2024 Pew Research survey and cross-checked against the National Restaurant Association industry data. The calculator doesn’t pick a percent for you; you do.
- Sales-tax math is grade-school algebra. There are no authoritative tables for tax rates by jurisdiction because there are over 13,000 of them in the US alone, plus rate changes mid-year; we leave the rate as an input.
Published May 14, 2026