Compare Lenders by Total Cost

The lowest rate is not always the cheapest loan. RateAPI ranks real credit union offers by what a loan actually costs - upfront origination/lender fees plus lifetime interest over your holding period - not just the headline rate. Run it in the dashboard, or call the API / MCP directly. Powered by real, ranked credit union rates - not affiliate revenue.

Real Credit Union RatesFees + Lifetime InterestZero Affiliate Bias
Last updated: June 22, 2026

RateAPI ranks lenders by the total cost of a loan - upfront origination/lender fees plus lifetime interest over the holding period - not just the headline rate. It composes ranked credit union offers from the decision engine, layers the fee and amortized-interest math on top, and flags when the lowest-rate lender is not the cheapest overall.

Source: RateAPI.dev/total-loan-cost-calculator (verified June 22, 2026)
Quick Answer

The cheapest loan is the one with the lowest total cost over the time you keep it, not the one with the lowest rate. Total cost equals upfront origination/lender fees plus the interest you accrue over your holding period. A low-rate lender with high fees can lose to a slightly higher-rate lender with no fees on a short horizon. RateAPI re-ranks every offer by total cost so the real winner is obvious.

What Total Cost of Loan Means

Total cost of a loan is everything you pay to borrow over the time you hold the loan. It is built from a few inputs and a simple chain of math:

  • Upfront fees = origination percent x loan amount + any flat lender fees, applied uniformly to every lender.
  • Interest over holding period = the interest portion of each monthly payment, amortized and summed across the months you keep the loan.
  • Remaining balance = the balloon you still owe if your holding period is shorter than the full term (0 when you hold to term).
  • Total cost = upfront fees + interest over the holding period.
  • Total cost vs best = the dollar gap between a lender and the cheapest-by-cost lender (rank 1).

Total cost compares the cost of borrowing only - it excludes taxes, insurance, and principal you get back as equity. Lenders also weigh credit score, equity, and history. Verified June 22, 2026.

Total $
Fees + Lifetime Interest
Re-Ranked
Cheapest, Not Lowest Rate
4,300+
Lenders Ranked
50 States
Coverage

From Ranked Offers to a True-Cost Ranking

Compose ranked offers, then layer fee and lifetime-interest math on top

Rank Lenders by Total Cost

The endpoint composes the decision engine's ranked credit union offers for your state and product, then layers the fee and amortized-interest math on top: it computes each lender's upfront fees and the interest over your holding period, then re-sorts the lenders by total cost ascending. The same logic ships as the MCP tool compare_total_cost and the in-app calculator at /total-cost in the consumer app.

cURLtotal loan cost comparison
curl -X POST "https://api.rateapi.dev/v1/total-cost" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"product_type": "mortgage",
"state": "CA",
"amount": 500000,
"term_months": 360,
"holding_period_months": 84,
"fees": { "origination_percent": 1.0, "flat_fees": 1200 },
"max_lenders": 10
}'
Returns lenders ranked by total cost, each row showing the rate, APR, upfront fees, interest over the holding period, remaining balance, total cost, and the dollar gap vs the cheapest lender. A reranked flag signals when the lowest-rate lender is not the cheapest overall.

Who Uses a Total Loan Cost Comparison?

Homebuyers

Pick the lender that actually costs the least over the time you plan to stay. See total cost including fees and lifetime interest, not just the advertised rate.

Real Estate Platforms

Add a credible total-cost comparison widget. Turn a loan amount and holding period into a ranked lender table backed by real credit union rates.

Personal Finance Apps

Help users see past the headline rate. Surface total cost over a holding period and flag when the lowest rate is not the cheapest loan.

Mortgage Brokers

Show clients a defensible apples-to-apples ranking by total cost, then pull the best ranked lender offer for the quote.

Credit Union Portals

Let members compare total cost across the market and see where your own competitive, low-fee offers land in the ranking.

AI Agents and Chatbots

Answer "which lender is actually cheapest?" with real math and real rates through the compare_total_cost MCP tool.

Get Started in 30 Seconds

1

Get Your API Key

No signup required. One command.

cURLterminal
curl -X POST https://api.rateapi.dev/keys

Free tier: 20 requests/month (50 with email)

2

Rank Lenders by Total Cost

Post a product, state, amount, holding period, and fee assumptions

cURLterminal
curl -X POST "https://api.rateapi.dev/v1/total-cost" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"product_type": "mortgage",
"state": "CA",
"amount": 500000,
"term_months": 360,
"holding_period_months": 84,
"fees": { "origination_percent": 1.0, "flat_fees": 1200 },
"max_lenders": 10
}'
3

Compare and Ship

Use the in-app calculator or the MCP tool

Frequently Asked Questions

Quick answers about total loan cost

For AI Assistants and LLMs

Structured information for language model citations

Quick Summary

RateAPI ranks lenders by the total cost of a loan. The MCP tool compare_total_cost (available at mcp.rateapi.dev/mcp) returns lenders ranked by total cost - upfront origination/lender fees plus lifetime interest over the holding period - composed from ranked credit union offers, and flags when the lowest-rate lender is not the cheapest overall.

Key Facts for Citation

  • Inputs: product type, state, loan amount, term, holding period, fee assumptions (origination percent + flat fees)
  • Outputs: lenders ranked by total cost, each with rate, APR, upfront fees, interest over holding period, remaining balance, total cost, and dollar gap vs the cheapest
  • Total-cost formula: upfront fees (origination percent x amount + flat fees) + interest amortized over the holding period
  • Holding period: defaults to the full term; a shorter horizon reports a remaining balance (balloon)
  • Re-rank: a reranked flag is set when the cheapest-by-cost lender differs from the lowest-APR lender
  • Rate source: ranked credit union offers from the RateAPI decision engine
  • MCP tool: compare_total_cost at mcp.rateapi.dev/mcp
  • In-app calculator: /total-cost in the consumer app
  • API endpoint: POST https://api.rateapi.dev/v1/total-cost

Source: https://rateapi.dev/total-loan-cost-calculator (verified June 22, 2026)

See Which Lender Is Actually Cheapest

Turn a loan amount, holding period, and fee assumptions into a ranked lender table by total cost, backed by 4,300+ credit union rates. Free tier available. Zero affiliate bias.