diff --git a/src/app/calculators/4-percent-rule/FourPercentRuleCalculator.tsx b/src/app/calculators/4-percent-rule/FourPercentRuleCalculator.tsx new file mode 100644 index 0000000..371c226 --- /dev/null +++ b/src/app/calculators/4-percent-rule/FourPercentRuleCalculator.tsx @@ -0,0 +1,223 @@ +"use client"; + +import { useState } from "react"; +import { + Card, + CardContent, + CardDescription, + CardHeader, + CardTitle, +} from "@/components/ui/card"; +import { Input } from "@/components/ui/input"; +import { Label } from "@/components/ui/label"; +import { Slider } from "@/components/ui/slider"; + +export default function FourPercentRuleCalculator() { + const [annualExpenses, setAnnualExpenses] = useState(50000); + const [portfolioValue, setPortfolioValue] = useState(0); + const [withdrawalRate, setWithdrawalRate] = useState(4); + + // Calculate FIRE number based on withdrawal rate + const fireNumber = Math.round(annualExpenses / (withdrawalRate / 100)); + + // Calculate safe withdrawal amount from portfolio + const safeWithdrawal = Math.round(portfolioValue * (withdrawalRate / 100)); + + // Calculate years to FIRE if saving + const monthlySavings = 2000; // Default for demo + const growthRate = 0.07; // 7% annual growth + const yearsToFire = + portfolioValue < fireNumber + ? Math.log( + (fireNumber + (monthlySavings * 12) / growthRate) / + (portfolioValue + (monthlySavings * 12) / growthRate), + ) / Math.log(1 + growthRate) + : 0; + + // Format currency + const formatCurrency = (value: number) => { + return new Intl.NumberFormat("en-US", { + style: "currency", + currency: "USD", + minimumFractionDigits: 0, + maximumFractionDigits: 0, + }).format(value); + }; + + return ( +
+ {/* Input Section */} + + + Calculate Your FIRE Number + + Enter your annual expenses and current portfolio value to see your + path to financial independence + + + +
+
+ + setAnnualExpenses(Number(e.target.value))} + min={0} + step={1000} + /> +

+ Your yearly spending in retirement +

+
+ +
+ + setPortfolioValue(Number(e.target.value))} + min={0} + step={10000} + /> +

+ Your current invested assets +

+
+
+ +
+
+ + {withdrawalRate}% +
+ setWithdrawalRate(value[0] ?? 4)} + className="w-full" + /> +

+ The classic 4% rule suggests 4%, but adjust based on your risk + tolerance +

+
+
+
+ + {/* Results Section */} +
+ + + Your FIRE Number + + Portfolio needed for {withdrawalRate}% withdrawal rate + + + +

+ {formatCurrency(fireNumber)} +

+

+ This is {Math.round(fireNumber / annualExpenses)}× your annual + expenses +

+ {portfolioValue > 0 && portfolioValue < fireNumber && ( +
+

Progress to FIRE

+
+
+
+

+ {Math.round((portfolioValue / fireNumber) * 100)}% complete +

+
+ )} + + + + + + Safe Annual Withdrawal + From your current portfolio + + +

+ {formatCurrency(safeWithdrawal)} +

+

+ Monthly: {formatCurrency(safeWithdrawal / 12)} +

+ {safeWithdrawal > 0 && safeWithdrawal < annualExpenses && ( +
+

+ ⚠️ Your safe withdrawal ({formatCurrency(safeWithdrawal)}) is + less than your annual expenses ( + {formatCurrency(annualExpenses)}) +

+
+ )} + {safeWithdrawal >= annualExpenses && ( +
+

+ ✓ Congratulations! You've reached FIRE +

+
+ )} +
+
+
+ + {/* Additional Insights */} + + + Quick Insights + + +
+
+

Gap to FIRE

+

+ {formatCurrency(Math.max(fireNumber - portfolioValue, 0))} +

+
+
+

Monthly Target

+

+ {formatCurrency(annualExpenses / 12)} +

+
+
+

25× Rule Result

+

+ {formatCurrency(annualExpenses * 25)} +

+
+
+
+
+ + {/* Educational Note */} + + +

+ 💡 Pro Tip: The 4% rule is based on a 30-year + retirement. For early retirees planning 40-50+ years, consider using + 3.5% or even 3% for added safety. Remember to account for taxes, + healthcare costs, and inflation in your planning. +

+
+
+
+ ); +} diff --git a/src/app/calculators/4-percent-rule/page.tsx b/src/app/calculators/4-percent-rule/page.tsx new file mode 100644 index 0000000..be0536b --- /dev/null +++ b/src/app/calculators/4-percent-rule/page.tsx @@ -0,0 +1,429 @@ +import type { Metadata } from "next"; +import Link from "next/link"; +import Image from "next/image"; +import BackgroundPattern from "@/app/components/BackgroundPattern"; +import Footer from "@/app/components/footer"; +import FourPercentRuleCalculator from "./FourPercentRuleCalculator"; +import { + Accordion, + AccordionContent, + AccordionItem, + AccordionTrigger, +} from "@/components/ui/accordion"; + +export const metadata: Metadata = { + title: "4% Rule Calculator - Safe Withdrawal Rate for FIRE | InvestingFIRE", + description: + "Calculate your safe withdrawal rate using the 4% rule. Determine how much you need to retire early and how long your retirement savings will last. Free FIRE calculator with real-time results.", + keywords: + "4 percent rule calculator, safe withdrawal rate calculator, 4% rule retirement, FIRE calculator, retirement withdrawal calculator, Trinity Study calculator", + openGraph: { + title: "4% Rule Calculator - Safe Withdrawal Rate Calculator", + description: + "Free 4% rule calculator to determine your safe withdrawal rate and retirement portfolio size. Based on the Trinity Study for FIRE planning.", + type: "website", + url: "https://investingfire.com/calculators/4-percent-rule", + }, +}; + +export default function FourPercentRulePage() { + const faqData = { + "@context": "https://schema.org", + "@type": "FAQPage", + mainEntity: [ + { + "@type": "Question", + name: "What is the 4% rule?", + acceptedAnswer: { + "@type": "Answer", + text: "The 4% rule is a retirement planning guideline that suggests you can safely withdraw 4% of your retirement portfolio in the first year, then adjust that amount for inflation each subsequent year, with a high probability of not running out of money over 30 years.", + }, + }, + { + "@type": "Question", + name: "How accurate is the 4% rule?", + acceptedAnswer: { + "@type": "Answer", + text: "The 4% rule, based on the Trinity Study, showed a 95% success rate for a 30-year retirement with a 50/50 stock/bond portfolio. However, it's based on historical U.S. market data and may need adjustment for longer retirements, different asset allocations, or varying market conditions.", + }, + }, + { + "@type": "Question", + name: "Is 4% too conservative or too aggressive?", + acceptedAnswer: { + "@type": "Answer", + text: "It depends on your situation. For early retirees with 40-50+ year horizons, 4% might be too aggressive. Some prefer 3-3.5%. Conversely, flexible spenders who can reduce withdrawals in down markets might safely use 4.5-5%. Personal factors like other income sources and spending flexibility matter.", + }, + }, + { + "@type": "Question", + name: "How do I calculate my FIRE number using the 4% rule?", + acceptedAnswer: { + "@type": "Answer", + text: "Simply multiply your annual expenses by 25. For example, if you need $40,000 per year, your FIRE number is $1,000,000 ($40,000 × 25). This gives you a portfolio where 4% equals your annual spending needs.", + }, + }, + ], + }; + + const breadcrumbData = { + "@context": "https://schema.org", + "@type": "BreadcrumbList", + itemListElement: [ + { + "@type": "ListItem", + position: 1, + name: "Home", + item: "https://investingfire.com", + }, + { + "@type": "ListItem", + position: 2, + name: "Calculators", + item: "https://investingfire.com/calculators", + }, + { + "@type": "ListItem", + position: 3, + name: "4% Rule Calculator", + item: "https://investingfire.com/calculators/4-percent-rule", + }, + ], + }; + + return ( +
+ + + {/* Header */} +
+
+ + InvestingFIRE Logo + InvestingFIRE + +
+ +

+ 4% Rule Calculator +

+

+ Calculate Your Safe Withdrawal Rate & FIRE Number Using the Trinity + Study Method +

+
+ + {/* Breadcrumb Schema */} +