My Swiss Mortgage Calculator: Mastering Your Real Estate Project

My Swiss Mortgage Calculator: Mastering Your Real Estate Project
Buying property in Switzerland is a journey filled with regulatory hurdles and complex calculations. Between the 20% equity rule, the 5% imputed interest rate, and the affordability check, it’s easy to get lost.
This is why I decided to code my own Swiss Mortgage Calculator, available at smc.alexin.tech.

Why this project?
As a tech enthusiast living in Switzerland, I noticed that many online calculators are either too simplistic or hidden behind contact forms for brokers. I wanted a tool that is:
- Transparent: Clearly showing the calculation rules.
- Fast: Providing instant results without page refreshes.
- Comprehensive: Including specifics like the withdrawal of the 2nd pillar (LPP).
Integrated Swiss Banking Rules
My calculator doesn’t just do additions. It integrates the actual validation criteria of Swiss banks:
1. The Equity Rule (Eigenkapital)
In Switzerland, you generally need to provide at least 20% of the purchase price as equity. But there’s a catch: at least 10% must come from “hard equity” (cash or 3rd pillar). The 2nd pillar (LPP) can cover the rest but cannot constitute the entire minimum equity requirement.
2. Financial Affordability (Tragbarkeit)
Banks use an imputed interest rate of 5% (stress-test) to ensure you can afford the mortgage even if rates rise. Total annual costs (imputed interest + 1% maintenance + amortization) must not exceed 33% of your gross annual income.
3. Income Stability Analysis
If you are self-employed or if your income has varied significantly over the last 3 years, the calculator applies a variance check (15% threshold). If the income is unstable, it uses a more conservative approach in line with banking requirements.
Under the Hood
The project is developed using Vanilla Javascript, HTML5, and CSS3. I used Chart.js for data visualization and distribution charts.
Two Modes of Use:
- Standard Mode: You have a price in mind and check if it’s feasible.
- Max Price Mode: The tool calculates the maximum amount you can borrow based on your salary and equity.
Conclusion
This calculator is a personal project that allows me to combine business with pleasure: coding a high-performance tool while helping the community better understand the Swiss real estate market.
Feel free to test it at smc.alexin.tech and give me your feedback!
Enjoy 😎
AlexIn Tech