Transparent math

Calculation Methodology

This page documents how every calculator works: the formulas, the rounding rules, the assumptions, the validation limits, and how the results are tested.

Last updated: November 24, 2026

1. The standard loan model

All loan calculators use a fixed-rate, fully amortizing installment loan. Payments are equal (except the final payment adjustment), interest is charged on the remaining principal, and the balance reaches zero at the end of the term.

The monthly payment is calculated with the standard annuity formula:

M = P × [r(1 + r)^n] ÷ [(1 + r)^n − 1]
  • M = monthly payment before cent rounding.
  • P = amount financed (loan principal).
  • r = APR ÷ 100 ÷ 12 (monthly rate as a decimal).
  • n = term in months.

When the APR is exactly 0%, the division is bypassed and the payment is P ÷ n. This avoids a division-by-zero error and matches the behavior of a zero-interest installment loan.

The entered APR is treated as the nominal annual rate used for the amortization math. In practice, a lender's note rate and APR can differ because the APR includes certain finance charges. Enter financed fees separately; the calculator does not reverse-engineer a note rate from an APR. Results are estimates, not lender disclosures.

The implementation uses Math.log1p and Math.expm1 internally to keep the formula stable for very small rates, then rounds the payment to cents.

2. Amortization and rounding

The schedule is built one month at a time:

  1. Monthly interest = remaining balance × monthly rate, rounded to cents.
  2. Principal = scheduled payment − interest.
  3. Remaining balance = previous balance − principal.

The regular payment is rounded to cents before the schedule begins. If rounding leaves a small residual balance at the end of the contractual term, the final payment is increased or reduced so the balance ends at exactly $0.00. This is why the last payment can differ by a few cents or dollars from the others.

Totals are accumulated in integer cents rather than floating-point dollars, so the sum of the rows reconciles with the loan amount. Every schedule is checked in testing to ensure:

  • Total principal equals the original loan amount.
  • Total payments equal total principal plus total interest.
  • The final balance is exactly zero.
  • No balance is negative and every row's payment equals its principal plus interest.

Money is displayed with two decimals using US currency formatting. Internally, values are kept at full precision between operations and rounded only where described. Dollar amounts are never intentionally truncated.

3. Auto loan calculator and state vehicle taxes

The auto loan calculator has two tax modes. With no state selected, it uses a manual rate: tax is applied to the entered vehicle price minus trade-in, and additional fees are not taxed. This is a legacy/manual estimate and does not claim to follow any state's rules.

With a state selected, the separate state-tax module in src/lib/tax/state-tax.mjs and src/lib/tax/calculate-state-tax.mjs applies the state's vehicle tax scheme, trade-in treatment, rebate treatment where verified, and dealer documentation-fee treatment where verified. The engine supports ordinary sales/use tax, motor vehicle excise/use taxes, Georgia TAVT, North Carolina Highway Use Tax, Hawaii GET, Arizona TPT, and Delaware's motor vehicle document fee as distinct categories.

Taxable base = max(0, price − eligible trade-in − tax-reducing rebate) + taxable doc fee

State tax = taxable base × state rate, with state-specific tiers, minimums, or caps where applicable. Local tax is calculated separately from a rate the user enters from an official state/local lookup, or from a flat local amount where the state uses a flat vehicle excise or private-party use tax. Some local taxes apply only to a capped base (for example, the first $5,000 in Florida or the first $1,600 in Tennessee). Local rates may be sourced by delivery county, dealer location, registration address, buyer residence, or the location where the vehicle is customarily kept; the calculator explains the required location for the selected state. For Florida motor vehicles, the county surtax follows the purchaser’s registration/residence county, not the dealer or delivery location. Local amounts are not embedded because they vary by address and change frequently. ZIP, county, and city are recorded for context but are not used to auto-look up a local rate in this build.

Rebates and discounts are classified as an assigned manufacturer rebate, a dealer discount/dealer rebate, an after-sale manufacturer rebate, or another incentive. A dealer discount reduces the taxable price in every modeled state. An assigned manufacturer rebate follows the selected state's verified treatment. An after-sale rebate does not reduce the taxable price and is not subtracted from the amount financed; apply it after receipt. Other incentives are treated conservatively and produce a warning. Documentation-fee treatment is also state-specific: verified taxable fees are added to the base, verified nontaxable fees are excluded, and unverified fees are excluded with a warning.

Some states use special schemes not represented by the generic formula: Illinois private-party RUT-5 use tax, Minnesota flat local vehicle excise tax, Texas private-party standard presumptive value, Georgia used-vehicle TAVT assessed value, Rhode Island/Vermont/West Virginia private-party book-value rules, and state-specific caps such as North Carolina’s commercial-vehicle HUT cap, Michigan’s annual dealer-only trade-in cap, Florida’s qualifying-property private-party trade-in rule, Minnesota’s motor-vehicle-only trade-in rule, and Washington’s like-kind trade-in rule. The calculator requests the information needed for these rules and displays warnings where an input or official verification is still missing.

Each result carries a verification status. “Verified state-level core” means the state rate, trade-in rule, and local-tax mode used by the engine were checked against an official state source. “Partial” means one or more dimensions are still unverified and the result must be treated as an estimate. “Manual” means a special scheme is not fully modeled. The full source/status table is on the state vehicle tax sources page.

The calculator does not estimate title or registration fees. Enter the actual DMV/dealer amount. Dealer documentation fees are a separate input; where their tax treatment is unverified the fee is excluded from the tax base and a warning is shown.

California specifics

California's statewide base rate is 7.25%. District taxes are added at the buyer's full vehicle registration address, so a ZIP code alone is not used and the local rate remains a manual input from the CDTFA address lookup. California does not allow a trade-in tax credit: the trade-in value reduces the amount financed but not the taxable selling price. A down payment and negative equity likewise change the loan amount, not the taxable price. Dealer documentation fees are taxable. An assigned manufacturer rebate remains part of the taxable selling price, while a dealer discount reduces it; other incentive programs may differ. Actual DMV title and registration fees are separate from the taxable base, are not auto-estimated, and require vehicle-specific information.

For a private-party purchase, California use tax generally applies to the full consideration, including any assumed debt or the value of traded property. The calculator does not subtract a trade-in allowance in that case; enter the total consideration as the vehicle price. See CDTFA Publication 52 and the official DMV fee page linked on the state vehicle tax sources page.

Manual tax mode

Manual tax = max(0, price − trade-in) × entered rate

This is the fallback used when no state is selected. It does not apply state trade-in, local-tax, rebate, or documentation-fee rules. It is retained for comparison and for users who already have a tax figure from a dealer or DMV.

Trade-in and negative equity

Net trade = trade-in value − amount owed on trade-in

A positive net trade reduces the amount financed. A negative net trade (negative equity) increases it. The amount owed is paid off as part of the transaction, so it is included in the new loan rather than treated as cash. The trade-in tax credit, when applicable, is based on the trade-in value under the selected state's rules and is separate from the payoff amount. Eligibility can depend on the seller and property type: Georgia and Michigan limit the reduction to dealer sales; Minnesota requires a motor vehicle trade-in; Florida private-party sales require a motor vehicle, aircraft, boat, or mobile home; and Washington, Utah private-party, New York, Vermont, and West Virginia have their own conditions. The calculator asks for confirmation where the rule is conditional.

Amount financed

Amount financed = price + financed taxes and fees − down payment − net trade − tax-reducing rebate or dealer discount

If the “include taxes and fees” toggle is off, tax and fees are excluded from the loan and included in cash due at signing instead. If the result is zero or negative, the calculator reports that no loan is needed. A result more negative than a few cents is treated as an input error, because the down payment, trade-in, and applicable rebate would exceed the total vehicle cost. An after-sale rebate is not subtracted from the amount financed; apply it after you receive it.

Cash definitions

  • Cash at signing = down payment + any upfront taxes and fees.
  • Total cash paid = cash at signing + all scheduled payments.
  • Trade-in equity is not counted as cash, because it is an asset the buyer already owns. The amount owed on the trade-in is inside the loan.

Payment dates begin in the next calendar month by default. The displayed payoff date is the month of the final scheduled payment.

4. Amortization calculator

The amortization calculator accepts a loan amount, APR, term, and optional first payment month. It builds the complete monthly schedule, groups it by calendar year, and produces an annual summary. If no valid start month is supplied, the first day of next month is used.

Dates are computed as the first day of each month and presented in US English. Grouping by calendar year means the first and last years may contain fewer than 12 payments. CSV export contains every payment plus a totals row, with plain numeric values and no currency symbols.

5. Comparison calculator

Each offer is amortized independently using its amount financed, APR, term, down payment, and fees. The comparison metrics are:

  • Total of payments = sum of all scheduled payments (principal + interest).
  • Total cost = down payment + fees + total of payments.
  • Difference = offer total cost − lowest total cost.

The lowest total cost is identified by the smallest total cost, not the smallest monthly payment. The lowest monthly payment is reported separately. If the offers finance different amounts, the calculator warns that the totals are not directly comparable.

Fees are treated as cash paid at signing, separate from the amount financed. If fees are financed in a particular offer, the user should include them in the amount financed instead. The calculator does not recommend an offer.

6. Affordability calculator

The affordability estimate applies two constraints:

  1. Income guideline: total monthly vehicle costs (loan payment + insurance + fuel and maintenance) are limited to a selected percentage of gross monthly income. The default is 15%, with 10% and 20% alternatives.
  2. Debt-to-income guideline: existing monthly debt payments plus the new loan payment are limited to 40% of gross monthly income.

The smaller of the two limits becomes the total monthly vehicle budget. Insurance, fuel, and maintenance are subtracted to find the amount available for the loan payment. The 10%, 15%, and 20% scenarios apply the same debt-to-income cap independently.

Monthly living expenses are validated against income and used as a cash-flow warning. If the estimated total vehicle costs exceed the income remaining after expenses and existing debt, the calculator flags the mismatch and recommends considering a lower budget. Living expenses do not directly reduce the percentage-based budget, because the inputs use gross income and the calculator does not estimate income taxes. The amount shown as left after expenses and debts is therefore a pre-tax figure. Both the percentage target and the 40% debt-to-income cap are general guidelines, not universal rules or loan approvals.

Vehicle budget = PV(loan payment, APR, term) + down payment

Present value uses the standard annuity formula:

PV = payment × [1 − (1 + r)^(−n)] ÷ r

At 0% APR, the present value is simply the payment multiplied by the number of months. If the available loan payment is zero or negative, the vehicle budget is reported as zero and the calculator explains why.

The vehicle budget is a purchase price before sales tax, title, registration, and dealer fees. Those costs are not estimated by this calculator and can reduce the affordable price. The result is a budgeting estimate, not an approval or personalized advice.

7. Refinance calculator

The current loan is modeled from the outstanding balance, current APR, and remaining term. The current monthly payment is recalculated from those figures, which assumes the loan is on its original schedule and has no missed or extra payments. The refinanced loan uses the same balance plus any financed fees, the new APR, and the new term.

  • Monthly savings = current payment − new payment.
  • Interest savings = current total interest − new total interest.
  • Total savings = current total of payments − (new total of payments + upfront fees). If fees are financed, they are inside the new payments.
  • Fee break-even = fees ÷ monthly savings, rounded up to a whole month. It is only reported when fees are paid upfront, monthly savings are positive, and the result falls within the new term.

The verdict is based on total savings. If the total remaining cost increases, the calculator labels the refinance as more expensive even if the monthly payment is lower. If the monthly payment rises but total cost falls, it says so explicitly. A lower payment alone is never treated as a benefit.

8. Extra payment calculator

The baseline schedule uses the entered balance, APR, remaining term, and regular payment. The accelerated schedule adds the extra monthly amount and an optional one-time payment in a chosen month. Both schedules run until the balance reaches zero, with a safety limit of 1,200 months.

Extra amounts are applied after the regular payment and capped at the remaining balance. If the loan pays off before the scheduled one-time payment month, the one-time payment is not applied and the calculator says so. The final payment is reduced to clear the balance.

If the regular payment is below the amount needed to amortize the balance over the stated remaining term, the baseline may run longer than that term. The calculator warns the user and shows the payment that would clear the loan on schedule. A payment that does not cover the monthly interest is rejected.

Savings are calculated as baseline interest − accelerated interest. Months saved are baseline months − accelerated months. A longer baseline due to a low payment affects both figures, which is why the warning is displayed.

9. Validation limits

Inputs are validated before any calculation. Invalid values produce a field-level message; the calculator does not silently substitute a number.

InputAccepted range
Vehicle price$100 to $10,000,000
Down payment, trade-in, amount owed, loan balance$0 to $10,000,000
Additional fees$0 to $100,000
APR0% to 35%
Loan term12 to 120 whole months
Sales tax rate0% to 20%
Gross monthly income$1 to $1,000,000
Insurance, fuel and maintenance$0 to $10,000 per month
Budget target5% to 30% of gross income

The extra payment calculator also requires the regular payment to be greater than the monthly interest, and the one-time payment month must be within the remaining term. These limits are broad enough for typical US auto loans but prevent nonsensical or runaway calculations.

10. Accuracy and testing

The finance engine is a standalone module used by the website, the static build, and the test suite. The automated tests cover the payment formula, 0% loans, amortization totals, rounding, dates, annual summaries, CSV output, validation, trade-in and negative equity, affordability tiers, refinance verdicts, and extra payment scenarios.

Expected values were generated by an independent reference implementation written in Python using the Decimal type. It is intentionally structured differently from the JavaScript code and is kept in the repository at tools/reference_calc.py. Hard-coded expected results in the tests come from that reference, not from the production engine.

The suite also generates a range of deterministic random loans and checks that every schedule reconciles: principal equals the amount financed, payments equal principal plus interest, and the final balance is zero. A schedule that fails to repay the loan, or a payment that does not cover monthly interest, raises an error rather than producing a misleading result.

11. Known limitations

  • Fixed rates only; no variable-rate, balloon, interest-only, or deferred-payment loans.
  • No credit decisioning, underwriting, insurance quotes, or lender-specific fees.
  • State vehicle tax data is labeled verified, partial, or manual in the calculator and on the state vehicle tax sources page.
  • No local tax rate is auto-looked-up. Local rates, county/city add-ons, and special-district rates must be entered from an official source.
  • Title and registration fees are manual; dealer documentation-fee tax treatment is state- and transaction-specific. Verified taxable fees are included, verified nontaxable fees are excluded, and unverified fees are excluded with a warning.
  • Assigned rebates use state-specific treatment. Dealer discounts reduce the taxable price. After-sale rebates do not reduce the tax base or the amount financed. Other incentives remain unverified and are disclosed.
  • No federal sales tax is applied. Federal excise taxes on certain heavy vehicles or tires, and federal income-tax treatment, are outside this passenger-vehicle calculator.
  • Conditional trade-in credits (new/used, dealer/private, registered-title requirements) may require manual verification. Georgia and Michigan dealer-only rules and Florida/Minnesota property-type rules are modeled where supported.
  • Special value-based schemes and local caps may not be fully modeled; the result shows warnings where this applies. Georgia used-vehicle TAVT requires a manual assessed fair market value; otherwise the sale price is used only as a labeled estimate.
  • No property tax, registration renewal, parking, tolls, or repairs in the affordability model.
  • No prepayment penalties, late fees, or per-diem interest in the schedules.
  • Dates assume monthly payments on the first of the month for display purposes.
  • Refinance comparisons assume the current loan is paid exactly on schedule.
  • Results are estimates, not lender disclosures or payoff quotes.

12. Updates

This methodology is reviewed when a calculator changes. The date at the top of the page reflects the most recent update. If you believe a formula, assumption, or result is wrong, please contact us with the details so it can be investigated.