Finance

The 8th Wonder of the World: Making Compound Interest Work For You

selective focus photo of stacked coins
Photo by Pixabay on Pexels.com
How Compound Interest Really Works (with Real Examples) | RepeatZone{“@context”:”https://schema.org”,”@type”:”FAQPage”,”mainEntity”:[{“@type”:”Question”,”name”:”What is compound interest?”,”acceptedAnswer”:{“@type”:”Answer”,”text”:”Interest earned on the principal plus previously earned interest, causing growth to accelerate over time.”}},{“@type”:”Question”,”name”:”How can I benefit from it?”,”acceptedAnswer”:{“@type”:”Answer”,”text”:”Start early, automate contributions, and minimize fees.”}}]}// Utility: format number as currency function fmt(x){ return x.toLocaleString(undefined,{maximumFractionDigits:2,minimumFractionDigits:2}); }const principalEl = document.getElementById(‘principal’); const rateEl = document.getElementById(‘rate’); const nEl = document.getElementById(‘n’); const yearsEl = document.getElementById(‘years’); const useContributionEl = document.getElementById(‘useContribution’); const contributionEl = document.getElementById(‘contribution’); const showTableEl = document.getElementById(‘showTable’); const calcBtn = document.getElementById(‘calcBtn’); const resetBtn = document.getElementById(‘resetBtn’);useContributionEl.addEventListener(‘change’, ()=>{ contributionEl.disabled = !useContributionEl.checked; if(!useContributionEl.checked) contributionEl.value = 0; });resetBtn.addEventListener(‘click’, ()=>{ principalEl.value = 10000; rateEl.value = 7; nEl.value = 12; yearsEl.value = 10; contributionEl.value = 0; useContributionEl.checked = false; contributionEl.disabled = true; showTableEl.value = ‘yes’; document.getElementById(‘out’).style.display = ‘none’; clearCanvas(); document.getElementById(‘tableWrap’).innerHTML=”; });calcBtn.addEventListener(‘click’, ()=>{ const P = parseFloat(principalEl.value) || 0; const r = (parseFloat(rateEl.value) || 0)/100; const n = parseInt(nEl.value,10) || 1; const t = parseFloat(yearsEl.value) || 0; const useCont = useContributionEl.checked; const C = useCont ? (parseFloat(contributionEl.value) || 0) : 0;// Validate if(t <= 0){alert('Please enter a positive number of years.'); return} if(P < 0 || r < 0 || n <= 0 || C 0){ if(ratePerPeriod === 0){ fvContrib = C * periods; } else { fvContrib = C * ((compoundFactor – 1) / ratePerPeriod); } } const FV = fvPrincipal + fvContrib;const totalPrincipal = P + (C * periods); const totalInterest = FV – totalPrincipal;document.getElementById(‘fv’).textContent = ‘₹ ‘ + fmt(FV); document.getElementById(‘totalPrincipal’).textContent = ‘₹ ‘ + fmt(totalPrincipal); document.getElementById(‘totalInterest’).textContent = ‘₹ ‘ + fmt(totalInterest); document.getElementById(‘out’).style.display = ‘block’;// Draw growth chart (simple line chart) drawChart(P, r, n, t, C);// Amortization table if requested if(showTableEl.value === ‘yes’){ renderTable(P, r, n, t, C); } else { document.getElementById(‘tableWrap’).innerHTML = ”; } });// Chart: simple canvas line chart showing value at each year function clearCanvas(){ const c = document.getElementById(‘chart’); c.width = c.clientWidth * devicePixelRatio; c.height = c.clientHeight * devicePixelRatio; const ctx = c.getContext(‘2d’); ctx.clearRect(0,0,c.width,c.height); }function drawChart(P, annualR, n, t, C){ const c = document.getElementById(‘chart’); const w = c.clientWidth; const h = c.clientHeight; c.width = w * devicePixelRatio; c.height = h * devicePixelRatio; const ctx = c.getContext(‘2d’); ctx.scale(devicePixelRatio, devicePixelRatio); ctx.clearRect(0,0,w,h);// Points: compute value at end of each year (including fractional last year) const years = Math.ceil(t); const points = []; for(let year=0; year 0){ const actualPeriods = periods; if(ratePerPeriod === 0){ fvContrib = C * actualPeriods; } else { fvContrib = C * ((Math.pow(1+ratePerPeriod, actualPeriods) – 1) / ratePerPeriod); } } const val = fvPrincipal + fvContrib; points.push({x: year, y: val}); }const maxY = Math.max(…points.map(p=>p.y)); const minY = P; const padding = 28; const plotW = w – padding*2; const plotH = h – padding*2;// axes ctx.strokeStyle = ‘#e6eefc’; ctx.lineWidth=1; ctx.beginPath(); ctx.moveTo(padding, padding); ctx.lineTo(padding, padding+plotH); ctx.lineTo(padding+plotW, padding+plotH); ctx.stroke();// grid horizontal lines and labels ctx.fillStyle = ‘#6b7280′; ctx.font = ’12px system-ui’; const steps = 4; for(let i=0;i{ const px = padding + (pt.x/years) * plotW; const py = padding + plotH – ((pt.y – minY)/(maxY – minY || 1)) * plotH; if(idx===0) ctx.moveTo(px,py); else ctx.lineTo(px,py); }); ctx.strokeStyle = ‘#2563eb’; ctx.lineWidth=2; ctx.stroke();// draw points points.forEach(pt=>{ const px = padding + (pt.x/years) * plotW; const py = padding + plotH – ((pt.y – minY)/(maxY – minY || 1)) * plotH; ctx.beginPath(); ctx.arc(px,py,3,0,Math.PI*2); ctx.fillStyle=’#fff’; ctx.fill(); ctx.strokeStyle=’#2563eb’; ctx.lineWidth=2; ctx.stroke(); }); }function renderTable(P, r, n, t, C){ const tableWrap = document.getElementById(‘tableWrap’); const periods = Math.round(n * t); let html = ‘‘;let balance = P; for(let i=1;i<=periods;i++){ const interest = balance * (r / n); balance = balance + interest + C; html += ``; } html += ‘
PeriodBalancePrincipal AddedInterest This Period
${i}₹ ${fmt(balance)}₹ ${fmt(C)}₹ ${fmt(interest)}
‘; tableWrap.innerHTML = html; }// initialize small clearCanvas();/* same CSS */ body{font-family:system-ui,-apple-system,’Segoe UI’,Roboto,’Helvetica Neue’,Arial;line-height:1.7;color:#111;padding:24px;max-width:820px;margin:0 auto} h1{font-size:28px;margin-top:10px}h2{font-size:20px;margin-top:22px}.meta{color:#555;margin-bottom:18px}img.responsive{max-width:100%;height:auto;border-radius:8px}.note{background:#f7f9fc;padding:12px;border-left:4px solid #0b74de;margin:12px 0}.list{margin-left:18px}table{width:100%;border-collapse:collapse;margin:12px 0}th,td{padding:10px;border:1px solid #e6e6e6;text-align:left}th{background:#f3f6fb}footer{margin-top:30px;color:#666;font-size:13px}a{color:#0b74de}/* compound interest calculator */ :root{–bg:#f7f9fc;–card:#ffffff;–accent:#2563eb;–muted:#6b7280} /* html,body{height:100%;margin:0;font-family:Inter, ui-sans-serif, system-ui, -apple-system, “Segoe UI”, Roboto, “Helvetica Neue”, Arial} body{background:linear-gradient(180deg,#eef2ff 0%,var(–bg) 100%);display:flex;align-items:center;justify-content:center;padding:28px; margin-left:18px; margin-right:18px} */ .card{background:var(–card);border-radius:12px;box-shadow:0 8px 30px rgba(30,41,59,0.06);max-width:980px;width:100%;padding:22px} h1{font-size:20px;margin:0 0 10px} .grid{display:grid;grid-template-columns:repeat(2,1fr);gap:12px} label{display:block;font-size:13px;color:var(–muted);margin-bottom:6px} input[type=”number”],select{width:100%;padding:10px;border:1px solid #e6e9ef;border-radius:8px;font-size:15px} .row{display:flex;gap:10px} .btn{background:var(–accent);color:#fff;padding:10px 14px;border-radius:10px;border:0;cursor:pointer;font-weight:600} .results{margin-top:14px;border-radius:10px;padding:14px;border:1px dashed #e6e9ef;background:linear-gradient(180deg,rgba(37,99,235,0.03),transparent)} .big{font-size:20px;font-weight:700} table{width:100%;border-collapse:collapse;margin-top:12px} th,td{padding:8px;border-bottom:1px solid #f1f5f9;text-align:right;font-size:13px} th{text-align:left;color:var(–muted)} .chart{width:100%;height:220px;margin-top:12px;border-radius:8px;background:#fff;border:1px solid #eef2ff;padding:8px} .small{font-size:12px;color:var(–muted)} @media(max-width:700px){.grid{grid-template-columns:1fr}.row{flex-direction:column}}

How Compound Interest Really Works (with Real Examples)

Compound interest turns time into your ally. Below we show two simple examples and a quick comparison to illustrate the impact.

Example table — see the difference

ScenarioMonthly contributionYearsApprox. final value
Saver A$10030$100,000 (at ~7%)
Saver B$20020$120,000 (at ~7%)
(adsbygoogle = window.adsbygoogle || []).push({});

Practical tips

  • Automate monthly contributions.
  • Use tax-advantaged accounts when possible.
  • Keep fees low — fees reduce compound growth over decades.

Compound Interest Calculator

Estimate future value with optional periodic contributions. Enter numbers and click Calculate.

Annually (1) Semi-annually (2) Quarterly (4) Monthly (12) Daily (365)
No Yes
Future value:
Total principal:
Total interest earned:

Further reading

FAQ

Is compound interest only for investments?

No — it applies to savings, investments, and debt (which is why high-interest debt compounds against you).

(adsbygoogle = window.adsbygoogle || []).push({});