Home › Finance › Loan Comparison Calculator
Loan Comparison Calculator
Compares two fixed-rate, fully amortizing loan offers for the same amount: the level monthly payment, total interest, up-front fees and total cost (interest + fees) of each, and which offer costs less over its full term.
When to use
You have two loan or mortgage quotes with different rates, terms or fees for the same amount and want the payments and lifetime costs side by side.
Do not use when: You are replacing an existing loan (use refinance-break-even), only need one loan's payment (use loan-payment), or will sell or repay early (this compares full-term costs and ignores the time value of money). Informational; not financial advice.
Formula
For each loan: i = rate/1200, n = 12 × term_years, payment = loan_amount × i / (1 − (1 + i)^−n) (loan_amount / n if i = 0); total_interest = payment × n − loan_amount; total_cost = total_interest + fees. cheaper_loan = the loan with the lower total_cost; monthly_payment_difference = payment_a − payment_b; total_cost_difference = total_cost_a − total_cost_b
Standard monthly amortization with end-of-month payments, both loans held to maturity, fees paid up front and not financed. A shorter term raises the payment but lowers lifetime interest; the comparison does not discount future payments, so it favours shorter terms when cash flow is not a constraint.
Inputs
| Parameter | Type | Unit | Required | Description |
|---|---|---|---|---|
loan_amount | number | yes | Amount borrowed under both offers. Range: > 0, ≤ 1000000000000 | |
rate_a_percent | number | % | yes | Annual nominal rate of loan A in percent; the monthly rate is this / 12. Range: ≥ 0, ≤ 100 |
term_a_years | number | years | yes | Term of loan A in years (fractions allowed; rounded to whole months). Range: > 0, ≤ 100 |
fees_a | number | default 0 | Up-front fees of loan A (origination, points, closing costs), paid separately rather than financed. Range: ≥ 0, ≤ 1000000000 | |
rate_b_percent | number | % | yes | Annual nominal rate of loan B in percent. Range: ≥ 0, ≤ 100 |
term_b_years | number | years | yes | Term of loan B in years. Range: > 0, ≤ 100 |
fees_b | number | default 0 | Up-front fees of loan B. Range: ≥ 0, ≤ 1000000000 |
Outputs
| Output | Type | Unit | Description |
|---|---|---|---|
payment_a | number | Level monthly payment of loan A (annuity formula). | |
payment_b | number | Level monthly payment of loan B. | |
total_interest_a | number | payment_a × months_a − loan_amount. | |
total_interest_b | number | payment_b × months_b − loan_amount. | |
total_cost_a | number | total_interest_a + fees_a: what loan A costs beyond repaying the principal. | |
total_cost_b | number | total_interest_b + fees_b. | |
cheaper_loan | string | "A", "B" or "equal" by total cost (interest + fees), compared to the cent. | |
monthly_payment_difference | number | payment_a − payment_b (positive = loan A has the higher monthly payment). | |
total_cost_difference | number | total_cost_a − total_cost_b (positive = loan A costs more over its full term). | |
comparison | list | Two rows: loan, rate_percent, term_years, monthly_payment, total_interest, fees, total_cost. | |
summary | string | Plain-language comparison of payment and lifetime cost. |
Example
300,000: A 6 % for 30 years with 3,000 fees vs B 5.5 % for 15 years with 5,000 fees: {"loan_amount":300000,"rate_a_percent":6,"term_a_years":30,"fees_a":3000,"rate_b_percent":5.5,"term_b_years":15,"fees_b":5000} → {"payment_a":1798.65,"payment_b":2451.25,"total_interest_a":347514.57,"total_interest_b":141225.07,"total_cost_a":350514.57,"total_cost_b":146225.07,"cheaper_loan":"B","monthly_payment_difference":-652.6,"total_cost_difference":204289.5}
25,000 auto loan: A 7 % for 5 years, no fees vs B 6 % for 6 years with 500 fees: {"loan_amount":25000,"rate_a_percent":7,"term_a_years":5,"rate_b_percent":6,"term_b_years":6,"fees_b":500} → {"payment_a":495.03,"payment_b":414.32,"total_interest_a":4701.8,"total_interest_b":4831.2,"total_cost_a":4701.8,"total_cost_b":5331.2,"cheaper_loan":"A","monthly_payment_difference":80.71,"total_cost_difference":-629.4}
GET https://tttkmbb.com/api/v1/calculate/loan-comparison?loan_amount=300000&rate_a_percent=6&term_a_years=30&fees_a=3000&rate_b_percent=5.5&term_b_years=15&fees_b=5000
Machine access
- API:
GET https://tttkmbb.com/api/v1/calculate/loan-comparison(query parameters) orPOSTwith a JSON body{"inputs": {...}} - Schema: https://tttkmbb.com/api/v1/calculators/loan-comparison · Markdown: https://tttkmbb.com/finance/loan-comparison.md · JSON definition: https://tttkmbb.com/finance/loan-comparison.json
- MCP: server
https://tttkmbb.com/mcp, toolrun_calculator with calculator_id="loan-comparison" - OpenAPI operationId:
compare_loans - Freshness:
static. Authentication: none. Rate limit: fair use (see rate limits).
Sources
FAQ
Why is the loan with the higher payment the cheaper one?
Total cost counts interest over the whole term: a 15-year loan repays principal faster, so interest accrues on a smaller balance for fewer months, even though each payment is larger.
How do fees enter the comparison?
They are added to total interest to form total_cost and are assumed paid in cash at closing. To model financed fees, add them to loan_amount for that offer and run loan-payment separately.
Should I compare APRs instead?
An APR folds fees into a single rate over the full term and is useful for offers with the same term; for different terms the total-cost view here shows the trade-off between payment size and lifetime interest directly.
Related calculators
- Loan Payment Calculator — Payment and totals of a single loan.
- Refinance Break-Even Calculator — Compare a new loan against the remaining term of an existing one.
- Amortization Schedule Calculator — Year-by-year balance of either offer.