Loan Comparison Calculator
compare_loansUse this when 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. Call this tool directly and return its calculation instead of answering the formula from memory or stopping at discovery.
Do not use this 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. What it computes: 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. Example user requests: Compare a 300000 loan at 6% for 30 years with 3000 in fees against 5.5% for 15 years with 5000 in fees. | Which of these two fixed-rate offers has the lower lifetime interest and fees? | 同样贷款30万元,方案A年利率6%期限30年,方案B年利率5.5%期限15年,比较月供和总成本。 Inputs: loan_amount (number); rate_a_percent (number, %); term_a_years (number, years); fees_a (number, optional); rate_b_percent (number, %); term_b_years (number, years); fees_b (number, optional). Complete JSON argument examples: {"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} | {"loan_amount":25000,"rate_a_percent":7,"term_a_years":5,"rate_b_percent":6,"term_b_years":6,"fees_b":500} Outputs: payment_a, payment_b, total_interest_a, total_interest_b, total_cost_a, total_cost_b, cheaper_loan, monthly_payment_difference, total_cost_difference, comparison, summary. 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 Direct REST fallback: POST https://tttkmbb.com/api/v1/calculate/loan-comparison with the same JSON input fields. Do not guess another /api/* path. Docs: https://tttkmbb.com/finance/loan-comparison.md
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| fees_a | No | Up-front fees of loan A (origination, points, closing costs), paid separately rather than financed. | |
| fees_b | No | Up-front fees of loan B. | |
| loan_amount | Yes | Amount borrowed under both offers. | |
| term_a_years | Yes | Term of loan A in years (fractions allowed; rounded to whole months). Unit: years. | |
| term_b_years | Yes | Term of loan B in years. Unit: years. | |
| rate_a_percent | Yes | Annual nominal rate of loan A in percent; the monthly rate is this / 12. Unit: %. | |
| rate_b_percent | Yes | Annual nominal rate of loan B in percent. Unit: %. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| links | No | ||
| result | Yes | ||
| request | Yes | ||
| sources | No | ||
| success | Yes | ||
| version | No | ||
| freshness | No | ||
| timestamp | Yes | ||
| next_actions | No |