Investiční kalkulačka

Porovnejte investici do nemovitosti s alternativními možnostmi investování a zjistěte, která varianta je pro vás nejvýhodnější.

POROVNÁNÍ INVESTIC

Nemovitost vs. ETF Portfolio

Porovnejte investici do nemovitosti s pasivním ETF portfoliem a zjistěte, která varianta vám přinese lepší výnos. Kalkulačka porovnává dva scénáře:

1. Investice do nemovitosti: Koupíte nemovitost částečně financovanou hypotékou, kterou pronajímáte. Zisk tvoří příjem z nájmu a růst hodnoty nemovitosti.

2. ETF Portfolio: Místo koupě nemovitosti investujete vlastní prostředky do ETF portfolia a měsíčně (místo splátky hypotéky) do něj přispíváte částkou odpovídající rozdílu mezi nájmem a náklady na nemovitost.

Investice do nemovitosti

Hypotéka na míru

Měsíční splátka hypotéky: 0 Kč

Tato částka představuje vaši měsíční splátku hypotéky při zadaných parametrech.

Celková kupní cena nemovitosti včetně všech poplatků

Výše vlastních prostředků, které máte k dispozici

%

Roční úroková sazba hypotéky (p.a.)

Doba splácení hypotéky v letech

Předpokládaný měsíční příjem z pronájmu

%

Očekávaný roční růst hodnoty nemovitosti

%

Roční náklady na údržbu jako procento z ceny nemovitosti

%

Průměrná roční obsazenost nemovitosti nájemníky

ETF Portfolio

Stejná částka jako vlastní zdroje u nemovitosti

Volné prostředky k investování - (příjem z nájmu - splátka hypotéky) * obsazenost

%

Průměrný očekávaný roční výnos portfolia

%

Míra kolebání hodnoty portfolia v čase (riziko investice)

%

Celkové roční náklady na správu ETF portfolia (TER)

Porovnání po 30 letech

Nemovitost

Hodnota nemovitosti

12 000 000 Kč

Celkový čistý příjem z pronájmu

8 500 000 Kč

Celkové náklady

3 200 000 Kč

Celkový čistý výnos

17 300 000 Kč

ETF Portfolio

Hodnota portfolia

15 000 000 Kč

Celkové vklady

10 000 000 Kč

Celkové poplatky

250 000 Kč

Celkový čistý výnos

14 750 000 Kč

function formatCurrency(number) { return new Intl.NumberFormat('cs-CZ', { style: 'currency', currency: 'CZK', maximumFractionDigits: 0 }).format(number); } // Formátování vstupu function formatInput(input) { let value = input.value.replace(/\D/g, ''); if (value === '') return; input.value = new Intl.NumberFormat('cs-CZ').format(value); } // Výpočet měsíční splátky hypotéky function calculateMortgagePayment(principal, rate, years) { if (!principal || !years) return 0; const monthlyRate = rate / 12; const numberOfPayments = years * 12; if (monthlyRate === 0) { return principal / numberOfPayments; } const payment = principal * monthlyRate * Math.pow(1 + monthlyRate, numberOfPayments) / (Math.pow(1 + monthlyRate, numberOfPayments) - 1); return isNaN(payment) ? 0 : payment; } // Výpočet hodnoty nemovitosti function calculatePropertyValue(initialValue, appreciationRate, years) { return initialValue * Math.pow(1 + appreciationRate / 100, years); } // Výpočet hodnoty ETF portfolia function calculatePortfolioValue(initialInvestment, monthlyInvestment, returnRate, managementFee, years) { const effectiveRate = (returnRate - managementFee) / 100; let value = initialInvestment; // Použijeme vzorec pro složené úročení s pravidelnými vklady // FV = P(1+r)^t + PMT * (((1+r)^t - 1) / r) // kde FV = budoucí hodnota, P = počáteční investice, r = roční výnos, // t = počet let, PMT = měsíční vklad * 12 (roční vklad) const annualInvestment = monthlyInvestment * 12; if (effectiveRate === 0) { return initialInvestment + (annualInvestment * years); } const futureValueInitial = initialInvestment * Math.pow(1 + effectiveRate, years); const futureValuePayments = annualInvestment * ((Math.pow(1 + effectiveRate, years) - 1) / effectiveRate); return futureValueInitial + futureValuePayments; } // Inicializace grafu let comparisonChart = null; function updateChart(propertyValues, portfolioValues) { const ctx = document.getElementById('comparison-chart').getContext('2d'); if (comparisonChart) { comparisonChart.destroy(); } comparisonChart = new Chart(ctx, { type: 'line', data: { labels: Array.from({length: 31}, (_, i) => i), datasets: [{ label: 'Nemovitost', data: propertyValues, borderColor: '#0F4C81', backgroundColor: 'rgba(15, 76, 129, 0.1)', fill: true }, { label: 'ETF Portfolio', data: portfolioValues, borderColor: '#10B981', backgroundColor: 'rgba(16, 185, 129, 0.1)', fill: true }] }, options: { responsive: true, plugins: { title: { display: true, text: 'Vývoj hodnoty investic v čase' } }, scales: { y: { beginAtZero: true, ticks: { callback: function(value) { return formatCurrency(value); } } } } } }); } // Aktualizace výpočtů function updateCalculations() { // Získání hodnot z inputů const propertyPrice = parseFloat(document.getElementById('property-price').value.replace(/\D/g, '')); const downPayment = parseFloat(document.getElementById('down-payment').value.replace(/\D/g, '')); const mortgageRate = parseFloat(document.getElementById('mortgage-rate').value); const mortgageYears = parseInt(document.getElementById('mortgage-years').value); const monthlyRent = parseFloat(document.getElementById('monthly-rent').value.replace(/\D/g, '')); const propertyAppreciation = parseFloat(document.getElementById('property-appreciation').value); const maintenanceCost = parseFloat(document.getElementById('maintenance-cost').value); const occupancyRate = parseFloat(document.getElementById('occupancy-rate').value); const initialInvestment = parseFloat(document.getElementById('initial-investment').value.replace(/\D/g, '')); const portfolioReturn = parseFloat(document.getElementById('portfolio-return').value); const managementFee = parseFloat(document.getElementById('management-fee').value); // Výpočty pro nemovitost const mortgageAmount = propertyPrice - downPayment; const monthlyMortgagePayment = calculateMortgagePayment(mortgageAmount, mortgageRate / 100, mortgageYears); // Aktualizace zobrazení měsíční splátky document.getElementById('mortgage-payment').textContent = formatCurrency(monthlyMortgagePayment); // Výpočet měsíční investice = (Výše příjmu z nájmu - výše měsíční splátky hypotéky) * obsazenost const monthlyInvestment = Math.max(0, monthlyRent - monthlyMortgagePayment) * (occupancyRate / 100); document.getElementById('monthly-investment').value = Math.round(monthlyInvestment); formatInput(document.getElementById('monthly-investment')); const finalPropertyValue = calculatePropertyValue(propertyPrice, propertyAppreciation, mortgageYears); const annualRent = monthlyRent * 12 * (occupancyRate / 100); const annualMaintenance = propertyPrice * (maintenanceCost / 100); const totalRentalIncome = annualRent * mortgageYears; const totalPropertyCosts = (monthlyMortgagePayment * 12 * mortgageYears) + (annualMaintenance * mortgageYears); const propertyTotalReturn = finalPropertyValue + totalRentalIncome - totalPropertyCosts; // Výpočty pro ETF portfolio const portfolioFinalValue = calculatePortfolioValue(initialInvestment, monthlyInvestment, portfolioReturn, managementFee, mortgageYears); const totalInvestments = initialInvestment + (monthlyInvestment * 12 * mortgageYears); const totalFees = portfolioFinalValue * (managementFee / 100) * mortgageYears; const portfolioTotalReturn = portfolioFinalValue - totalFees; // Aktualizace výsledků document.getElementById('comparison-title').textContent = `Porovnání po ${mortgageYears} ${mortgageYears === 1 ? 'roce' : mortgageYears < 5 ? 'letech' : 'letech'}`; document.getElementById('property-final-value').textContent = formatCurrency(finalPropertyValue); document.getElementById('total-rental-income').textContent = formatCurrency(totalRentalIncome); document.getElementById('total-property-costs').textContent = formatCurrency(totalPropertyCosts); document.getElementById('property-total-return').textContent = formatCurrency(propertyTotalReturn); document.getElementById('portfolio-final-value').textContent = formatCurrency(portfolioFinalValue); document.getElementById('total-investments').textContent = formatCurrency(totalInvestments); document.getElementById('total-fees').textContent = formatCurrency(totalFees); document.getElementById('portfolio-total-return').textContent = formatCurrency(portfolioTotalReturn); // Generování dat pro graf const propertyValues = []; const portfolioValues = []; for (let year = 0; year <= mortgageYears; year++) { const propertyValue = calculatePropertyValue(propertyPrice, propertyAppreciation, year); const rentIncome = annualRent * year; const costs = (monthlyMortgagePayment * 12 * year) + (annualMaintenance * year); propertyValues.push(propertyValue + rentIncome - costs); const portfolioValue = calculatePortfolioValue(initialInvestment, monthlyInvestment, portfolioReturn, managementFee, year); portfolioValues.push(portfolioValue); } updateChart(propertyValues, portfolioValues); } // Přidání event listenerů document.addEventListener('DOMContentLoaded', function() { const inputs = document.querySelectorAll('input'); inputs.forEach(input => { // Přidání event listenerů pro všechny vstupy input.addEventListener('input', function() { // Formátování pro peněžní pole if (input.id !== 'mortgage-rate' && input.id !== 'mortgage-years' && input.id !== 'property-appreciation' && input.id !== 'maintenance-cost' && input.id !== 'occupancy-rate' && input.id !== 'portfolio-return' && input.id !== 'portfolio-risk' && input.id !== 'management-fee') { formatInput(this); } // Synchronizace vlastních zdrojů a počáteční investice if (this.id === 'down-payment') { document.getElementById('initial-investment').value = this.value; formatInput(document.getElementById('initial-investment')); } else if (this.id === 'initial-investment') { document.getElementById('down-payment').value = this.value; formatInput(document.getElementById('down-payment')); } // Aktualizace všech výpočtů updateCalculations(); }); }); // Inicializace výpočtů updateCalculations(); });