¿Qué es el Interés Compuesto y por qué es tan poderoso?
El interés compuesto es el proceso donde los intereses generados por un capital se reinvierten para generar nuevos intereses. A diferencia del interés simple, donde solo se gana dinero sobre el capital inicial, el interés compuesto permite que tu dinero crezca de forma exponencial con el tiempo.
La Fórmula Utilizada
Esta calculadora utiliza la fórmula estándar para el interés compuesto con aportaciones periódicas:
Supongamos que comienzas con un capital de 1.000 €, decides ahorrar 100 € cada mes y obtienes una rentabilidad anual del 8%. Al cabo de 20 años:
Habrás depositado un total de 25.000 €.
Gracias al interés compuesto, tu saldo final será de aproximadamente 63.500 €.
¡Has ganado más de 38.000 € solo en intereses!
La clave fundamental es el tiempo: cuanto antes empieces, más tiempo tendrá el interés compuesto para multiplicar tus ahorros.
function calculateCompoundInterest() {
var P = parseFloat(document.getElementById('initial_deposit').value);
var PMT = parseFloat(document.getElementById('monthly_contribution').value);
var annualRate = parseFloat(document.getElementById('interest_rate').value) / 100;
var t = parseFloat(document.getElementById('investment_years').value);
var n = parseInt(document.getElementById('compound_frequency').value);
if (isNaN(P) || isNaN(PMT) || isNaN(annualRate) || isNaN(t)) {
alert("Por favor, introduce todos los valores correctamente.");
return;
}
// n for the formula (frequency of compounding)
// PMT logic: If contributions are monthly, we adjust the formula
// We assume contributions match the compounding frequency for basic calculation,
// but standard wealth math usually assumes monthly PMT even if compounding is quarterly.
// Let's use the most common accurate standard:
var r = annualRate / n;
var nt = n * t;
// If contributions are monthly (standard) and compounding happens n times
// We'll normalize to monthly for the PMT part if compounding is different
var monthlyRate = annualRate / 12;
var months = t * 12;
// Calculation for Initial Principal
var principalCompound = P * Math.pow((1 + annualRate / n), (n * t));
// Calculation for Monthly Annuity (Future Value of Series)
// Formula for monthly contributions: PMT * [((1 + r)^n – 1) / r]
var annuityCompound = 0;
if (PMT > 0) {
annuityCompound = PMT * (Math.pow(1 + monthlyRate, months) – 1) / monthlyRate;
}
var totalAmount = principalCompound + annuityCompound;
var totalInvested = P + (PMT * months);
var totalInterest = totalAmount – totalInvested;
// Display Results
document.getElementById('final_balance').innerText = totalAmount.toLocaleString('es-ES', { minimumFractionDigits: 2, maximumFractionDigits: 2 });
document.getElementById('total_deposits').innerText = totalInvested.toLocaleString('es-ES', { minimumFractionDigits: 2, maximumFractionDigits: 2 });
document.getElementById('total_interest').innerText = totalInterest.toLocaleString('es-ES', { minimumFractionDigits: 2, maximumFractionDigits: 2 });
document.getElementById('result_container').style.display = 'block';
}