Loan interest calculator
Borrowing 10,000 at 6% for 5 years means 60 payments of 193.33 and 1,599.68 in total interest. See the full cost of a fixed-rate loan before you sign, not just the monthly payment. Free in your browser.
- Free
- Runs in your browser
- No sign-up
- Your data stays on your device
Run — free
Worked example
- Principal amount
- 10,000
- Annual rate
- 6
- Term years
- 5
- Monthly rate
- 0.005
- Payment count
- 60
- Monthly payment
- 193.33
- Total paid
- 11,599.68
A monthly payment is easy to compare and easy to misunderstand. The number that actually describes the cost of borrowing is the total interest paid over the full term of the loan. This loan interest calculator accepts principal, an annual rate as a percent, and a term in years, then returns the lifetime interest on a fixed-rate fully amortizing note with monthly payments. The math is the classic closed-form installment identity, so a four-year personal loan and a thirty-year mortgage share the same engine.
What total interest on a loan actually measures
When a lender quotes a rate and a term, the headline figure is almost always the monthly payment. That installment is useful for cash-flow planning, but it hides how much of each payment is interest and how much reduces principal. On a fully amortizing loan the payment is constant: early months are mostly interest charged on the remaining balance, later months are mostly principal, and the balance reaches zero on the last scheduled date.
Total interest is the sum of every interest portion across the schedule, which equals the sum of all payments minus the original principal. That lifetime figure is what a household needs when choosing between a shorter and a longer term, what a coach shows next to an APR explainer, and what a product page should put beside the payment so a lower installment is not mistaken for a cheaper loan.
Simple interest of principal times rate times years does not answer this question, because the outstanding balance falls as you repay. The closed-form payment used here already encodes that declining balance, so you do not need a month-by-month table to obtain the lifetime cost. A zero rate produces zero interest and a payment of principal divided by the number of months.
A negative rate or a negative term is not a loan; those inputs fail validation rather than inventing a refund.
What you can do with it
Personal loan cost check
Enter principal, the quoted annual percent, and the term in years to see how much interest a fixed monthly installment loan will cost before you sign.
FAQ
How is loan interest calculated?
The fixed monthly payment uses the standard amortizing formula (or principal/n when the rate is zero). Total interest equals payment times the number of monthly payments minus principal.
Why not just multiply the loan by the rate and the years?
Because that simple-interest shortcut charges interest on the full amount every year, while on an amortizing loan the balance falls as you repay. It overstates the real cost; the installment formula already accounts for the shrinking balance.
Why are my first loan payments mostly interest?
Each payment first covers the interest on what you still owe, and the balance is largest at the start. As it shrinks, the interest share falls and more of the same payment goes to principal.
What if the interest rate is zero?
Then the total interest is zero and each payment is simply the amount borrowed divided by the number of monthly payments. A negative rate is rejected, because it does not describe a loan.
Can I enter a term of half a year or two and a half years?
Yes, as long as the term works out to a whole number of monthly payments: half a year is 6 payments. A term that does not land on a whole month is rejected, and the maximum is fifty years.
Related tools
For developers — API access
Everything on this page is available programmatically. This section is for teams who want to wire it into their own systems; everyone else can just use the tool above.
API endpoint
Prefer to automate it? One authenticated POST creates the task; the result comes back by webhook or a signed link. The same capability also runs here on the web, by email and from Telegram — and soon from our app too.
Call it from your stack
curl -X POST https://api.kit.forhosting.com/fin/loan-interest \
-H "Authorization: Bearer $KIT_KEY" \
-H "Content-Type: application/json" \
-d '{"principal":10000,"annual_rate":6,"term_years":5}'const res = await fetch("https://api.kit.forhosting.com/fin/loan-interest", {
method: "POST",
headers: {
"Authorization": `Bearer ${process.env.KIT_KEY}`,
"Content-Type": "application/json"
},
body: JSON.stringify({
"principal": 10000,
"annual_rate": 6,
"term_years": 5
})
});
const { task_id } = await res.json();import os, requests
res = requests.post(
"https://api.kit.forhosting.com/fin/loan-interest",
headers={"Authorization": f"Bearer {os.environ['KIT_KEY']}"},
json={
"principal": 10000,
"annual_rate": 6,
"term_years": 5
},
)
task_id = res.json()["task_id"]<?php
$res = file_get_contents("https://api.kit.forhosting.com/fin/loan-interest", false, stream_context_create([
"http" => [
"method" => "POST",
"header" => "Authorization: Bearer " . getenv("KIT_KEY") . "\r\nContent-Type: application/json",
"content" => '{"principal":10000,"annual_rate":6,"term_years":5}',
],
]));
$task = json_decode($res, true);body := bytes.NewBufferString(`{"principal":10000,"annual_rate":6,"term_years":5}`)
req, _ := http.NewRequest("POST", "https://api.kit.forhosting.com/fin/loan-interest", body)
req.Header.Set("Authorization", "Bearer "+os.Getenv("KIT_KEY"))
req.Header.Set("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)Example request
{
"principal": 10000,
"annual_rate": 6,
"term_years": 5
}Example response
{
"task_id": "tsk_a1b2c3d4e5f6a1b2c3d4e5f6",
"type": "fin.loan_interest",
"status": "queued",
"_links": {
"result": "/tasks/tsk_…/result"
}
}The API is asynchronous: the call returns a task_id immediately and the result arrives by webhook. Polling is capped at 1 req/s per task.
Pricing
Published price — no tokens, no invented credits. A failed task is never charged.
Errors
| HTTP | Code | Meaning |
|---|---|---|
401 | unauthorized | Missing or invalid API key. |
402 | insufficient_balance | Your balance doesn't cover the task price. |
404 | unknown_type | That task type doesn't exist. |
429 | rate_limited | Too many requests. Use the webhook instead of polling. |
Technical notes
A negative rate or a negative term is rejected with invalid_input instead of a nonsense negative cost.
Input contract, monthly payment formula, and response fields
A negative term is likewise rejected. Currency-like fields use half-up rounding to two decimal places. POST a JSON body with three required finite numbers. principal is the amount borrowed, greater than zero, with aliases amount and loan_amount so spreadsheets can keep familiar column names. annual_rate is the nominal annual percent—six means six percent per year, not a decimal 0.06—and aliases rate, interest_rate, and apr map to the same field. If annual_rate is negative the task fails with invalid_input naming the field; that is a contracted error and it is not billed. term_years is the term in years, greater than zero and at most fifty, with aliases term and years. The engine forms payment_count as term_years times twelve and requires that product to be a whole number of monthly payments, so a five-year note is sixty payments and a half-year note is six, while a term that does not land on a whole month is rejected with a clear message. The periodic rate r is annual_rate over one hundred divided by twelve. When r is zero, each payment is principal divided by payment_count and total interest is zero. When r is positive, payment equals principal times r times (one plus r) to the n, divided by (one plus r) to the n minus one, with n equal to payment_count. total_paid is payment times n; total_interest is total_paid minus principal. Outputs also echo principal, annual_rate, term_years, monthly_rate, payment_count, monthly_payment, and a short formula string. Missing fields, non-finite numbers, non-positive principal, and a term that is not a whole number of months fail with invalid_input and are not billed.
Where a loan interest API earns its keep
Personal-finance pages that rank for loan interest need a live lifetime-cost number next to the payment so visitors see why a longer term can look cheaper month to month and still cost more. Advisors and coaches sweep rate or term across competing offers and rank them by total interest instead of installment alone. The tool does not emit a period-by-period schedule, taxes, insurance, points, or a variable-rate path—only the fixed-rate monthly lifetime interest and related totals from the closed-form payment. Marketplaces and originators pre-fill calculators from quote forms and need a deterministic parse endpoint that matches spreadsheet amortizations without standing up a banking core. Classrooms teaching amortization can assert total_interest against textbook cases with stable rounded goldens. Sweep term_years or annual_rate in a loop from your own code to build comparison tables; pin monthly_payment and total_interest in tests; and keep requests small.
Integration use cases
Term and rate side-by-sides
Sweep term_years or annual_rate across competing offers and rank them by total_interest instead of monthly payment alone.
Quotes, coaching, and homework oracles
Call the API from onboarding, advising tools, or exam generators for a deterministic total_interest figure that matches spreadsheet amortizations.
Technical questions
Which fields are required?
principal (greater than zero), annual_rate as a percent (must not be negative), and term_years (must not be negative, must be greater than zero). term_years times twelve must be a whole number of monthly payments.
Does annual_rate mean 0.06 or 6 for a 6% loan?
Use 6 for a 6% nominal annual rate. The engine divides by 100 internally before applying the monthly rate.
What happens if the rate or the term is negative?
The task fails with invalid_input. A negative annual_rate or a negative term_years is not a valid loan and is not billed.
What does the loan interest calculator cost?
The browser tool is free. API requests use prepaid KIT balance at $0.002 per successful call; invalid input is not billed.