Calculator Methodology

By John Brandenburg. Last updated June 26, 2026.

This page explains how Car Finance Garage models each financing scenario, what formulas it uses, and what assumptions it makes. If you want to audit the logic or understand a specific result, this is the right place to start.

Core metric: net cost

Every scenario is compared on a single number: net cost.

Net cost = vehicle cost + tax cost - investment growth

Vehicle cost is what leaves your pocket to pay for the car: down payment plus all loan payments made to a third party, or purchase price for cash scenarios. It does not include loan payments you make to yourself in a 401(k) loan, since those are transfers back to your own account rather than payments to a lender.

Tax cost is the capital gains tax owed when selling investments to fund a cash purchase. Investment growth is the compound return earned on money that stays in the market during the comparison window. A lower net cost is better.

Loan payment formula

Monthly payments use the standard fixed-rate amortization formula, equivalent to the PMT function in a spreadsheet:

payment = principal * r * (1 + r)^n / ((1 + r)^n - 1)

In that formula, r is the monthly interest rate and n is the number of monthly payments. For a zero-rate loan, payment is principal divided by n. Loan APR is treated as a nominal annual rate divided by 12 for monthly payments.

Investment growth

For dealer financing, money that would otherwise be used to pay cash remains invested. Growth is calculated over the loan term:

growth = principal * ((1 + annual_return)^(months / 12) - 1)

For liquidation, no future growth is credited because the investments were sold. For a 401(k) loan, the calculator does not pretend the full borrowed balance stayed invested. Instead, it models the monthly repayment stream: each payment returns to the account, then earns the monthly market return for the remaining months.

Capital gains tax

When investments are sold for a cash purchase, the model estimates how much must be sold to net the needed amount after tax:

tax = gross_sale * (1 - cost_basis_pct) * tax_rate

gross_sale = net_needed / (1 - (1 - cost_basis_pct) * tax_rate)

Example: if you need $40,000, your cost basis is 60%, and the tax rate is 15%, then 40% of the sale is taxable gain. You would need to sell about $42,553 gross to net $40,000 after roughly $2,553 of tax.

5-year total cost of ownership

TCO adds estimated ownership costs to financing cost. It covers five years and includes:

TCO is shown separately from net cost so users can distinguish purchase financing from ongoing ownership cost. The combined view adds both numbers.

Sensitivity analysis

The sensitivity chart sweeps the market return assumption from roughly half to double the current value and shows how net cost changes for each scenario. This helps identify whether a result is robust or depends heavily on a single market-return assumption.

Worked example

Vehicle: $42,000 MSRP, $2,000 manufacturer rebate, $5,000 down payment. Market return assumption: 7% annually. Capital gains tax: 15%, cost basis 60%.

Dealer financing at 7.5% APR for 60 months finances $35,000. The monthly payment is roughly $701 and total interest is roughly $7,060. If the investment balance stays in the market for five years and grows from $42,000 to about $58,900, the growth credit is about $16,900.

A 401(k) loan at 5.5% over 60 months may have a similar payment, but the model credits only the growth on repayments as they return to the account. A liquidation scenario must also count capital gains tax and has no future investment growth on the sold balance.

Known limitations

The IRS provides general background on capital gains and losses and retirement plan loans. The Consumer Financial Protection Bureau provides consumer resources for reviewing auto loans.

All calculations run in your browser. Saved cars, settings, and preferences are stored in browser local storage on your device. This methodology is educational only and is not financial, tax, legal, lending, or investment advice.