{"id":318,"date":"2025-09-21T14:52:00","date_gmt":"2025-09-21T09:22:00","guid":{"rendered":"https:\/\/myexpenseplanner.in\/blog\/?page_id=318"},"modified":"2025-09-21T15:38:15","modified_gmt":"2025-09-21T10:08:15","slug":"fire-number-calculator","status":"publish","type":"page","link":"https:\/\/myexpenseplanner.in\/blog\/fire-number-calculator\/","title":{"rendered":"Fire Number Calculator"},"content":{"rendered":"\n<h1 class=\"wp-block-heading has-text-align-center has-background-color has-text-color has-link-color wp-elements-aac3bf05e82e047996f0a6bbecb44dc5\">FIRE Number Calculator <\/h1>\n\n\n\n<h3 class=\"wp-block-heading has-text-align-center has-extra-primary-color has-text-color has-link-color wp-elements-8cf0a8b98ec4f1b389c44fb389d89881\"> Track Your Path to Financial Independence<\/h3>\n\n\n\n<div style=\"height:35px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<!DOCTYPE html>\n<html lang=\"en\">\n<head>\n<meta charset=\"UTF-8\">\n<meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\">\n<title>FIRE Number Calculator \u2014 MyExpensePlanner<\/title>\n<meta name=\"description\" content=\"Calculate your FIRE Number and track your path to financial independence with our interactive FIRE Calculator.\">\n<style>\nbody { font-family: Arial,sans-serif; background:#f4f4f9; margin:0; padding:20px; }\n.container { max-width:700px; margin:auto; background:#fff; padding:20px; border-radius:12px; box-shadow:0 2px 10px rgba(0,0,0,0.1); }\nh1 { text-align:center; color:#333; }\nlabel { display:block; margin:10px 0 5px; color:#555; }\ninput { width:100%; padding:10px; margin-bottom:15px; border:1px solid #ddd; border-radius:6px; }\nbutton { width:100%; padding:12px; background:#007bff; color:white; border:none; border-radius:6px; cursor:pointer; font-size:16px; }\nbutton:hover { background:#0056b3; }\n.back-btn { background:#555; margin-top:20px; }\n.results-container { display:flex; gap:20px; margin-top:20px; align-items:center; justify-content:space-between; flex-wrap:wrap; }\n.results-boxes { flex:1; min-width:220px; display:flex; flex-direction:column; gap:12px; }\n.results-chart { flex:1; max-width:300px; min-width:220px; display:none; }\n.result-card { padding:12px 16px; border-radius:8px; font-size:15px; font-weight:600; color:white; text-align:center; box-shadow:0 2px 6px rgba(0,0,0,0.12); display:flex; align-items:center; justify-content:center; gap:8px; }\n#fireNumberCard { background:#10b981; }\n#yearsToFIRECard { background:#2563eb; }\n@media (max-width:768px) { .results-container { flex-direction:column; align-items:center; } .results-chart { max-width:100%; } }\ncanvas { margin-top:0; }\n<\/style>\n<\/head>\n<body>\n\n<div class=\"container\">\n  <h1>FIRE Number Calculator<\/h1>\n\n  <label for=\"annualExpenses\">Annual Expenses (\u20b9)<\/label>\n  <input type=\"number\" id=\"annualExpenses\" value=\"600000\">\n\n  <label for=\"currentSavings\">Current Savings (\u20b9)<\/label>\n  <input type=\"number\" id=\"currentSavings\" value=\"2000000\">\n\n  <label for=\"annualSavings\">Annual Savings (\u20b9)<\/label>\n  <input type=\"number\" id=\"annualSavings\" value=\"300000\">\n\n  <label for=\"expectedReturn\">Expected Annual Return (%)<\/label>\n  <input type=\"number\" id=\"expectedReturn\" value=\"8\">\n\n  <label for=\"withdrawalRate\">Safe Withdrawal Rate (%)<\/label>\n  <input type=\"number\" id=\"withdrawalRate\" value=\"4\">\n\n  <button id=\"calculateBtn\" type=\"button\">Calculate<\/button>\n\n  <div class=\"results-container\">\n    <div class=\"results-boxes\">\n      <div class=\"result-card\" id=\"fireNumberCard\">\ud83d\udd25 FIRE Number: \u20b90<\/div>\n      <div class=\"result-card\" id=\"yearsToFIRECard\">\u23f3 Years to FIRE: 0<\/div>\n    <\/div>\n    <div class=\"results-chart\">\n      <canvas id=\"fireDoughnutChart\" width=\"300\" height=\"300\"><\/canvas>\n      <canvas id=\"fireLineChart\" width=\"300\" height=\"300\"><\/canvas>\n    <\/div>\n  <\/div>\n\n  <a href=\"financial-calculators\"><button class=\"back-btn\">Back to All Calculators<\/button><\/a>\n<\/div>\n\n<script src=\"https:\/\/cdn.jsdelivr.net\/npm\/chart.js\"><\/script>\n<script>\nlet doughnutChartInstance;\nlet lineChartInstance;\n\nfunction calculateFIRE() {\n  const annualExpenses = Number(document.getElementById('annualExpenses').value);\n  const currentSavings = Number(document.getElementById('currentSavings').value);\n  const annualSavings = Number(document.getElementById('annualSavings').value);\n  const expectedReturn = Number(document.getElementById('expectedReturn').value) \/ 100;\n  const withdrawalRate = Number(document.getElementById('withdrawalRate').value) \/ 100;\n\n  if (annualExpenses <= 0 || withdrawalRate <= 0) {\n    alert(\"Enter valid Annual Expenses and Withdrawal Rate!\");\n    return;\n  }\n\n  const fireNumber = annualExpenses \/ withdrawalRate;\n\n  \/\/ Calculate savings growth\n  let savings = currentSavings;\n  let years = 0;\n  const savingsHistory = [savings];\n  const labels = ['0y'];\n  const MAX_YEARS = 100;\n\n  while (years < MAX_YEARS) {\n    if (savings >= fireNumber) break;\n    savings = savings * (1 + expectedReturn) + annualSavings;\n    years++;\n    savingsHistory.push(savings);\n    labels.push(years + 'y');\n  }\n\n  \/\/ Update cards\n  document.getElementById('fireNumberCard').innerText = `\ud83d\udd25 FIRE Number: \u20b9${fireNumber.toLocaleString()}`;\n  document.getElementById('yearsToFIRECard').innerText = `\u23f3 Years to FIRE: ${years}`;\n\n  \/\/ Show chart container\n  document.querySelector('.results-chart').style.display = 'block';\n\n  \/\/ Doughnut chart\n  const doughnutCtx = document.getElementById('fireDoughnutChart').getContext('2d');\n  if (doughnutChartInstance) doughnutChartInstance.destroy();\n  doughnutChartInstance = new Chart(doughnutCtx, {\n    type: 'doughnut',\n    data: {\n      labels: ['Current Savings', 'Remaining to FIRE'],\n      datasets: [{\n        data: [currentSavings, Math.max(0, fireNumber - currentSavings)],\n        backgroundColor: ['#10b981', '#2563eb'],\n        hoverOffset: 6\n      }]\n    },\n    options: { responsive: true, plugins: { legend: { position: 'bottom' } } }\n  });\n\n  \/\/ Line chart\n  const lineCtx = document.getElementById('fireLineChart').getContext('2d');\n  if (lineChartInstance) lineChartInstance.destroy();\n  lineChartInstance = new Chart(lineCtx, {\n    type: 'line',\n    data: {\n      labels: labels,\n      datasets: [\n        { label: 'Savings (\u20b9)', data: savingsHistory, borderColor: '#10b981', fill: false, tension:0.3, pointRadius:3 },\n        { label: 'FIRE Number (\u20b9)', data: Array(labels.length).fill(fireNumber), borderColor: '#2563eb', borderDash:[5,5], fill:false, pointRadius:0 }\n      ]\n    },\n    options: {\n      responsive: true,\n      plugins: { legend: { position: 'bottom' } },\n      scales: {\n        y: { beginAtZero:true, title:{display:true, text:'Amount (\u20b9)'} },\n        x: { title:{display:true, text:'Years'} }\n      }\n    }\n  });\n}\n\n\/\/ Make function globally accessible for WordPress inline onclick\nwindow.calculateFIRE = calculateFIRE;\n\n\/\/ Attach button event\ndocument.addEventListener('DOMContentLoaded', function(){\n  const btn = document.getElementById('calculateBtn');\n  if(btn) btn.addEventListener('click', calculateFIRE);\n});\n<\/script>\n<\/body>\n<\/html>\n","protected":false},"excerpt":{"rendered":"<p>FIRE Number Calculator Track Your Path to Financial Independence FIRE Number Calculator \u2014 MyExpensePlanner FIRE Number Calculator Annual Expenses (\u20b9) Current Savings (\u20b9) Annual Savings (\u20b9) Expected Annual Return (%) Safe Withdrawal Rate (%) Calculate \ud83d\udd25 FIRE Number: \u20b90 \u23f3 Years to FIRE: 0 Back to All Calculators<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-318","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/myexpenseplanner.in\/blog\/wp-json\/wp\/v2\/pages\/318","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/myexpenseplanner.in\/blog\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/myexpenseplanner.in\/blog\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/myexpenseplanner.in\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/myexpenseplanner.in\/blog\/wp-json\/wp\/v2\/comments?post=318"}],"version-history":[{"count":16,"href":"https:\/\/myexpenseplanner.in\/blog\/wp-json\/wp\/v2\/pages\/318\/revisions"}],"predecessor-version":[{"id":341,"href":"https:\/\/myexpenseplanner.in\/blog\/wp-json\/wp\/v2\/pages\/318\/revisions\/341"}],"wp:attachment":[{"href":"https:\/\/myexpenseplanner.in\/blog\/wp-json\/wp\/v2\/media?parent=318"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}