A mortgage calculator that shows your share
We’ve added a mortgage calculator to the tools section. It calculates the monthly payment and the full schedule of a fixed or variable mortgage, shows what an early repayment saves in each of its two forms, and splits every figure by your ownership share if you own the home with someone else. It runs entirely on the page: nothing you type is sent anywhere.
For illustration only; not financial advice. Your bank’s figures depend on its own rounding, fees and payment dates.
Where it comes from
Ahorreo, our personal finance app, has a loans module. For each mortgage it builds the amortization schedule, reviews variable rates against Euribor, and pairs every payment in your bank statement with its row in the schedule so it can split it into interest and principal. Only the interest counts as an expense; the principal is money moving from your current account into the home you own.
The calculator is that module adapted to a single page. src/lib/mortgage.ts on this site follows the same rules as Ahorreo’s schedule.ts, rate.ts and scenarios.ts:
- Amounts are whole cents and rates are thousandths of a percentage point, so 3.245% is stored as 3245. No floating-point drift builds up over 360 payments (why that matters).
- The rounding left over goes into the last payment, so the principal repaid always adds up to exactly the loan.
- At each rate review the payment is recalculated for the remaining balance and months, keeping the end date.
What we left out is everything that needs a real contract: payment dates, day counts, fees and insurance. The calculator works in month numbers (month 1 is the first payment), not calendar dates.
What it calculates
The payment. Spanish mortgages normally use the French system: the same payment every month, with a growing part repaying the loan and a shrinking part paying interest. With a loan P, a monthly rate i and n payments, the payment is P·i / (1 − (1 + i)^−n). The code, from src/lib/mortgage.ts:
export function frenchPayment(principalCents: number, rate: Thousandths, months: number): number {
if (months <= 0) return principalCents;
const i = monthly(rate);
if (i === 0) return Math.round(principalCents / months);
return Math.round((principalCents * i) / (1 - Math.pow(1 + i, -months)));
}
Variable rates. A variable mortgage usually starts with a fixed rate for some months and then pays Euribor plus a spread (the diferencial in your contract), reviewed every 6 or 12 months. You give the calculator three Euribor values, low, central and high, and each one is held constant from the first review to the end of the loan.
These are scenarios, not forecasts. Nobody can tell you where Euribor will be in ten years, and a curve that goes up and down would look like knowledge we don’t have. What a scenario answers is the question you can actually ask: how much would a point up or down change what I pay? Because the index is constant, reviewing every 6 or 12 months gives the same total; the monthly table marks the review months so you can see when each one would fall.
If Euribor plus the spread goes below zero, the rate is zero. Spanish mortgage deeds say so, and the bank never pays you interest.
With the page’s default variable terms (2.50% for the first 12 months, then Euribor + 0.80%), the three scenarios come out like this on a 200,000 € loan over 30 years:
| Euribor | Rate after review | Payment after review | Total interest |
|---|---|---|---|
| 1.50% | 2.30% | 770.19 € | 77,510.44 € |
| 2.50% | 3.30% | 873.39 € | 113,422.99 € |
| 3.50% | 4.30% | 983.74 € | 151,825.77 € |
The first-year payment is 790.24 € in all three. After that, two points of Euribor separate the low and high scenarios by 213.55 € a month and about 74,000 € of interest.
Early repayment. Paying off part of the loan lowers the balance that interest is charged on. The bank then does one of two things: keeps the end date and lowers the payment, or keeps the payment and brings the end date forward. The calculator shows both next to “no early repayment”, with the payment after, the month of the last payment and the interest saved. It doesn’t include any early-repayment fee your contract may set.
Your share. Enter your ownership percentage and each total gets a second line with your part of it. The CSV export has one row per payment and a column with your share of that month’s payment.

A worked example
Take a fixed mortgage of 200,000 € at 3% over 30 years. These are round, invented numbers, and the page’s defaults.
- Monthly payment: 843.21 €.
- Total interest over the 30 years: 103,554.53 €.
- In the first year, 5,942.90 € of what you pay is interest and only 4,175.62 € repays the loan.
Now add an early repayment of 20,000 € at the start of year 6 (month 61), when 177,812.59 € is still owed.
| Option | Payment after | Last payment | Interest saved |
|---|---|---|---|
| Same payment, shorter term | 843.21 € | Year 27, month 1 (month 313) | 19,900.07 € |
| Lower payment, same end date | 748.37 € | Year 30, month 12 (month 360) | 8,453.11 € |
Keeping the payment saves more than twice as much interest, because the balance falls faster and so less interest is charged on it every month after. Lowering the payment saves less, but leaves 94.84 € a month free for the remaining 25 years. Neither is the right answer in general: it depends on what you’d do with that money, which is why the calculator shows both and doesn’t pick.
If you own the home 50/50, set your share to 50: your part of the payment is 421.61 € and your part of the total interest is 51,777.27 €. The same idea, applied to net worth, is in Household or my share?
A bug it found in Ahorreo
Building the calculator turned up a bug in Ahorreo’s own schedule. In “lower payment” mode, Ahorreo measures the remaining term after subtracting the repayment, using the old payment. So it gets a shorter term, and the payment barely drops: in the example above it gives 842.18 € over 314 payments instead of 748.37 € over 360. The calculator measures the term before subtracting. It is on Ahorreo’s list of open bugs and isn’t fixed yet.
The calculator is at /tools/mortgage-calculator/, with a longer explanation of each part below the results. If you want the same split between interest and principal for a mortgage you already have, with your real payments, that’s what Ahorreo does. Introducing Ahorreo explains the rest of it.
This article explains how our software works and the maths behind it. It is not financial, tax or legal advice: for decisions about your own money, check with a qualified professional.