@retiregolden/planner-ui 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (298) hide show
  1. package/LICENSE +661 -0
  2. package/README.md +181 -0
  3. package/package.json +77 -0
  4. package/src/App.tsx +246 -0
  5. package/src/RouteErrorBoundary.tsx +45 -0
  6. package/src/assets/hero.png +0 -0
  7. package/src/assets/react.svg +1 -0
  8. package/src/assets/vite.svg +1 -0
  9. package/src/data/fedInvestClient.ts +113 -0
  10. package/src/data/localStore.ts +42 -0
  11. package/src/data/planOrigin.ts +24 -0
  12. package/src/data/planStore.ts +165 -0
  13. package/src/data/v2Backup.ts +101 -0
  14. package/src/import/ImportPage.tsx +347 -0
  15. package/src/import/ReviewChecklistView.tsx +38 -0
  16. package/src/import/brokerCsv.ts +395 -0
  17. package/src/import/csv.ts +133 -0
  18. package/src/import/genericCsv.ts +224 -0
  19. package/src/import/projectionLab.ts +350 -0
  20. package/src/import/reviewChecklist.ts +33 -0
  21. package/src/import/tenForty.ts +275 -0
  22. package/src/index.css +630 -0
  23. package/src/index.ts +16 -0
  24. package/src/learn/ArticleBody.tsx +78 -0
  25. package/src/learn/ArticlePage.tsx +57 -0
  26. package/src/learn/GlossaryPage.tsx +33 -0
  27. package/src/learn/LearnAboutScreen.tsx +41 -0
  28. package/src/learn/LearnCards.tsx +41 -0
  29. package/src/learn/LearnLink.tsx +91 -0
  30. package/src/learn/LearningCenterPage.tsx +114 -0
  31. package/src/learn/SourcesPage.tsx +98 -0
  32. package/src/learn/components/ArticleFigure.tsx +34 -0
  33. package/src/learn/components/ArticleShell.tsx +86 -0
  34. package/src/learn/components/ComparisonTable.tsx +42 -0
  35. package/src/learn/components/FormulaBlock.tsx +34 -0
  36. package/src/learn/components/PurchasingPowerChart.tsx +41 -0
  37. package/src/learn/components/RelatedArticles.tsx +27 -0
  38. package/src/learn/components/ScenarioCard.tsx +24 -0
  39. package/src/learn/components/SourceList.tsx +23 -0
  40. package/src/learn/components/charts.tsx +21 -0
  41. package/src/learn/content/about-retiregolden.ts +100 -0
  42. package/src/learn/content/aca-premium-tax-credits-and-magi.ts +103 -0
  43. package/src/learn/content/account-types-overview.ts +106 -0
  44. package/src/learn/content/after-tax-estate.ts +111 -0
  45. package/src/learn/content/agi-magi-and-taxable-income.ts +112 -0
  46. package/src/learn/content/appealing-irmaa-ssa-44.ts +95 -0
  47. package/src/learn/content/assumption-general-inflation.ts +82 -0
  48. package/src/learn/content/assumption-healthcare-inflation.ts +85 -0
  49. package/src/learn/content/assumption-heir-tax-rate.ts +79 -0
  50. package/src/learn/content/assumption-investment-returns.ts +90 -0
  51. package/src/learn/content/assumption-longevity-planning-age.ts +78 -0
  52. package/src/learn/content/assumption-recent-magi.ts +83 -0
  53. package/src/learn/content/assumption-social-security-cola.ts +89 -0
  54. package/src/learn/content/assumption-social-security-trust-fund.ts +83 -0
  55. package/src/learn/content/assumption-state-tax-override.ts +79 -0
  56. package/src/learn/content/beneficiaries-and-account-titling.ts +99 -0
  57. package/src/learn/content/break-even-useful-lens.ts +94 -0
  58. package/src/learn/content/building-a-retirement-spending-budget.ts +100 -0
  59. package/src/learn/content/cola-and-inflation-protection.ts +102 -0
  60. package/src/learn/content/divorced-spousal-and-survivor-records.ts +104 -0
  61. package/src/learn/content/dynamic-spending-guardrails.ts +90 -0
  62. package/src/learn/content/earnings-test-before-fra.ts +100 -0
  63. package/src/learn/content/employer-match-and-contribution-order.ts +104 -0
  64. package/src/learn/content/examplePlanArticles.ts +525 -0
  65. package/src/learn/content/fees-expense-ratios-and-compounding-drag.ts +98 -0
  66. package/src/learn/content/fi-number-and-four-percent-rule.ts +64 -0
  67. package/src/learn/content/filling-a-tax-bracket-with-roth-conversions.ts +98 -0
  68. package/src/learn/content/funded-ratio.ts +70 -0
  69. package/src/learn/content/healthcare-after-65.ts +103 -0
  70. package/src/learn/content/healthcare-before-65.ts +104 -0
  71. package/src/learn/content/historical-vs-random-return-models.ts +101 -0
  72. package/src/learn/content/how-assumptions-change-the-answer.ts +105 -0
  73. package/src/learn/content/how-much-can-i-spend.ts +105 -0
  74. package/src/learn/content/how-social-security-is-taxed.ts +95 -0
  75. package/src/learn/content/how-the-optimizer-thinks.ts +102 -0
  76. package/src/learn/content/how-the-optimizer-values-after-tax-estate.ts +97 -0
  77. package/src/learn/content/how-to-model-accumulation.ts +67 -0
  78. package/src/learn/content/how-to-read-a-retirement-projection.ts +115 -0
  79. package/src/learn/content/hsas-and-qualified-medical-expenses.ts +108 -0
  80. package/src/learn/content/hsas-as-retirement-accounts.ts +101 -0
  81. package/src/learn/content/inflation-risk.ts +98 -0
  82. package/src/learn/content/inherited-ira-10-year-rule.ts +105 -0
  83. package/src/learn/content/insurance-in-your-retirement-plan.ts +103 -0
  84. package/src/learn/content/irmaa-two-year-lookback.ts +99 -0
  85. package/src/learn/content/long-term-care-costs-and-insurance.ts +103 -0
  86. package/src/learn/content/long-term-care-insurance-as-risk-transfer.ts +98 -0
  87. package/src/learn/content/longevity-risk.ts +99 -0
  88. package/src/learn/content/marginal-vs-effective-tax-rate.ts +98 -0
  89. package/src/learn/content/medicare-part-b-vs-part-d-irmaa.ts +102 -0
  90. package/src/learn/content/mortality-weighted-social-security.ts +113 -0
  91. package/src/learn/content/moving-to-retiregolden.ts +86 -0
  92. package/src/learn/content/niit-high-income-investment-tax.ts +98 -0
  93. package/src/learn/content/ordinary-income-vs-capital-gains.ts +103 -0
  94. package/src/learn/content/paying-conversion-taxes-taxable-vs-ira.ts +102 -0
  95. package/src/learn/content/pensions-and-annuities.ts +101 -0
  96. package/src/learn/content/permanent-life-insurance-in-a-plan.ts +106 -0
  97. package/src/learn/content/pia-aime-and-bend-points.ts +103 -0
  98. package/src/learn/content/planner-overview.ts +106 -0
  99. package/src/learn/content/planning-for-couples-and-survivor-years.ts +108 -0
  100. package/src/learn/content/privacy-what-stays-in-your-browser.ts +99 -0
  101. package/src/learn/content/qcds-qualified-charitable-distributions.ts +101 -0
  102. package/src/learn/content/reading-the-results-page.ts +96 -0
  103. package/src/learn/content/reading-the-social-security-analysis-page.ts +106 -0
  104. package/src/learn/content/real-estate-home-equity-and-debt.ts +100 -0
  105. package/src/learn/content/reports-csv-exports-and-sharing.ts +101 -0
  106. package/src/learn/content/risk-based-guardrails.ts +100 -0
  107. package/src/learn/content/rmds-required-minimum-distributions.ts +100 -0
  108. package/src/learn/content/roth-conversion-basics.ts +104 -0
  109. package/src/learn/content/rsus-and-espp.ts +101 -0
  110. package/src/learn/content/rule-of-55-and-72t.ts +107 -0
  111. package/src/learn/content/savings-rate-biggest-lever.ts +66 -0
  112. package/src/learn/content/seed-your-plan-from-your-tax-return.ts +93 -0
  113. package/src/learn/content/sensitivity-testing-what-changes-the-answer.ts +104 -0
  114. package/src/learn/content/sequence-of-returns-risk.ts +98 -0
  115. package/src/learn/content/social-security-bridge.ts +67 -0
  116. package/src/learn/content/social-security-claiming-age-basics.ts +113 -0
  117. package/src/learn/content/social-security-taxes-vs-benefits.ts +76 -0
  118. package/src/learn/content/spending-profiles-and-the-retirement-smile.ts +92 -0
  119. package/src/learn/content/spousal-and-survivor-benefits.ts +120 -0
  120. package/src/learn/content/ssdi-and-retirement-planning.ts +72 -0
  121. package/src/learn/content/standard-deduction-senior-deduction-and-itemizing.ts +97 -0
  122. package/src/learn/content/state-income-taxes-in-retirement.ts +97 -0
  123. package/src/learn/content/step-up-in-basis.ts +102 -0
  124. package/src/learn/content/survivor-planning-for-couples.ts +110 -0
  125. package/src/learn/content/survivor-spending-in-couple-plans.ts +98 -0
  126. package/src/learn/content/tax-cliffs-and-bracket-edges.ts +105 -0
  127. package/src/learn/content/tax-loss-and-gain-harvesting.ts +99 -0
  128. package/src/learn/content/taxable-brokerage-basis-and-capital-gains.ts +99 -0
  129. package/src/learn/content/three-big-questions-spending-time-risk.ts +103 -0
  130. package/src/learn/content/tips-ladders.ts +92 -0
  131. package/src/learn/content/todays-dollars-vs-future-dollars.ts +107 -0
  132. package/src/learn/content/traditional-vs-roth-contributions.ts +113 -0
  133. package/src/learn/content/troubleshooting-surprising-results.ts +105 -0
  134. package/src/learn/content/trust-fund-haircut-scenarios.ts +101 -0
  135. package/src/learn/content/understanding-monte-carlo-success-rate.ts +118 -0
  136. package/src/learn/content/understanding-your-plan-assumptions.ts +134 -0
  137. package/src/learn/content/using-assumptions-and-provenance.ts +98 -0
  138. package/src/learn/content/using-scenarios-to-compare-choices.ts +99 -0
  139. package/src/learn/content/what-changes-when-you-move-states.ts +141 -0
  140. package/src/learn/content/what-is-fire.ts +65 -0
  141. package/src/learn/content/what-monte-carlo-proves.ts +98 -0
  142. package/src/learn/content/what-retiregolden-models.ts +103 -0
  143. package/src/learn/content/what-retirement-healthcare-really-costs.ts +117 -0
  144. package/src/learn/content/why-95-percent-is-not-a-guarantee.ts +98 -0
  145. package/src/learn/content/why-roth-conversions-raise-other-costs.ts +106 -0
  146. package/src/learn/content/why-small-tax-cliffs-can-matter.ts +109 -0
  147. package/src/learn/content/widows-penalty-and-survivor-brackets.ts +106 -0
  148. package/src/learn/content/withdrawal-order-basics.ts +105 -0
  149. package/src/learn/glossary.ts +191 -0
  150. package/src/learn/inlineMarkdown.tsx +54 -0
  151. package/src/learn/learn.css +537 -0
  152. package/src/learn/learningRegistry.ts +502 -0
  153. package/src/longevity/LongevityResults.tsx +85 -0
  154. package/src/longevity/LongevityWizard.tsx +305 -0
  155. package/src/longevity/constants.ts +15 -0
  156. package/src/longevity/factors.ts +125 -0
  157. package/src/longevity/model.ts +31 -0
  158. package/src/longevity/persistedGuard.ts +129 -0
  159. package/src/longevity/storage.ts +40 -0
  160. package/src/mc/messages.ts +118 -0
  161. package/src/mc/monteCarlo.worker.ts +44 -0
  162. package/src/mc/pool.ts +267 -0
  163. package/src/mc/runRequest.ts +125 -0
  164. package/src/optimize/messages.ts +84 -0
  165. package/src/optimize/optimize.worker.ts +29 -0
  166. package/src/optimize/runOptimize.ts +92 -0
  167. package/src/optimize/runSpendingSolve.ts +47 -0
  168. package/src/optimize/runner.ts +21 -0
  169. package/src/optimize/spendingMessages.ts +44 -0
  170. package/src/optimize/spendingRunner.ts +21 -0
  171. package/src/optimize/spendingSolve.worker.ts +18 -0
  172. package/src/planner/AssumptionsCardPage.tsx +136 -0
  173. package/src/planner/BucketLensCard.tsx +114 -0
  174. package/src/planner/ComparePlansPage.tsx +219 -0
  175. package/src/planner/DisclaimerPage.tsx +88 -0
  176. package/src/planner/HowTestedPage.tsx +159 -0
  177. package/src/planner/LiveStatus.tsx +15 -0
  178. package/src/planner/LongevityModal.tsx +55 -0
  179. package/src/planner/Modal.tsx +97 -0
  180. package/src/planner/MonteCarloPage.tsx +907 -0
  181. package/src/planner/OptimizePage.tsx +611 -0
  182. package/src/planner/PlanContext.tsx +198 -0
  183. package/src/planner/PlanPickerPage.tsx +124 -0
  184. package/src/planner/PlanWorkspace.tsx +290 -0
  185. package/src/planner/ProvenancePanel.tsx +45 -0
  186. package/src/planner/RelocationComparePage.tsx +485 -0
  187. package/src/planner/ReportPage.tsx +375 -0
  188. package/src/planner/ResultsPage.tsx +817 -0
  189. package/src/planner/ScenariosPage.tsx +285 -0
  190. package/src/planner/SocialSecuritySection.tsx +556 -0
  191. package/src/planner/SpendingSolverPage.tsx +512 -0
  192. package/src/planner/SsAnalysisPage.tsx +1134 -0
  193. package/src/planner/SurvivalPercentileModal.tsx +161 -0
  194. package/src/planner/SurvivorTransitionPage.tsx +286 -0
  195. package/src/planner/assumptionsExport.ts +371 -0
  196. package/src/planner/bucketLens.ts +89 -0
  197. package/src/planner/chartFrame.ts +8 -0
  198. package/src/planner/chartStyle.ts +11 -0
  199. package/src/planner/dialogViews.tsx +184 -0
  200. package/src/planner/dialogs.tsx +133 -0
  201. package/src/planner/examples/ExampleLibrary.tsx +189 -0
  202. package/src/planner/examples/ExamplePreviewBanner.tsx +55 -0
  203. package/src/planner/examples/ExamplesPage.tsx +25 -0
  204. package/src/planner/examples/OpenExampleButton.tsx +61 -0
  205. package/src/planner/examples/buildAggressiveSaver.ts +102 -0
  206. package/src/planner/examples/buildAnnuityEstate.ts +137 -0
  207. package/src/planner/examples/buildBaristaFire.ts +115 -0
  208. package/src/planner/examples/buildBracketFillRoth.ts +65 -0
  209. package/src/planner/examples/buildBridgeEarlyRetirement.ts +94 -0
  210. package/src/planner/examples/buildBrokerageNoHsa.ts +109 -0
  211. package/src/planner/examples/buildCoastFire.ts +88 -0
  212. package/src/planner/examples/buildContext.ts +20 -0
  213. package/src/planner/examples/buildEarlyCareerMatch.ts +93 -0
  214. package/src/planner/examples/buildEarlyRetireeAca.ts +61 -0
  215. package/src/planner/examples/buildExampleCouple.ts +103 -0
  216. package/src/planner/examples/buildFixedTargetSpending.ts +74 -0
  217. package/src/planner/examples/buildGlidepathAllocation.ts +131 -0
  218. package/src/planner/examples/buildGuardrailsFlex.ts +120 -0
  219. package/src/planner/examples/buildHsaPropertyDepth.ts +109 -0
  220. package/src/planner/examples/buildHsaStealthRetirement.ts +97 -0
  221. package/src/planner/examples/buildLeanFatFire.ts +109 -0
  222. package/src/planner/examples/buildLtcShock.ts +62 -0
  223. package/src/planner/examples/buildMovingStateTax.ts +53 -0
  224. package/src/planner/examples/buildNoAnnuityBrokerage.ts +92 -0
  225. package/src/planner/examples/buildRmdIrmaa.ts +55 -0
  226. package/src/planner/examples/buildSalaryGrowthEscalation.ts +96 -0
  227. package/src/planner/examples/buildStaticAllocationControl.ts +96 -0
  228. package/src/planner/examples/buildSurvivorYears.ts +62 -0
  229. package/src/planner/examples/buildUnderSavedSingle.ts +51 -0
  230. package/src/planner/examples/exampleCopy.ts +23 -0
  231. package/src/planner/examples/loadExample.ts +90 -0
  232. package/src/planner/examples/registry.ts +313 -0
  233. package/src/planner/explainPanels.tsx +233 -0
  234. package/src/planner/fields.tsx +381 -0
  235. package/src/planner/format.ts +33 -0
  236. package/src/planner/home/DataAndPrivacyCard.tsx +56 -0
  237. package/src/planner/home/GettingStartedPaths.tsx +46 -0
  238. package/src/planner/home/GettingStartedReopener.tsx +32 -0
  239. package/src/planner/home/StartHereLinks.tsx +22 -0
  240. package/src/planner/home/WelcomeHero.tsx +39 -0
  241. package/src/planner/home/YourPlans.tsx +72 -0
  242. package/src/planner/home/importErrorMessage.ts +22 -0
  243. package/src/planner/home/startHereSlugs.ts +7 -0
  244. package/src/planner/home/useHomeData.ts +190 -0
  245. package/src/planner/home/useHomeMode.ts +47 -0
  246. package/src/planner/householdActions.ts +22 -0
  247. package/src/planner/insights/InsightCardView.tsx +340 -0
  248. package/src/planner/insights/InsightsPage.tsx +204 -0
  249. package/src/planner/insights/categoryLabels.ts +11 -0
  250. package/src/planner/learnLinks.ts +85 -0
  251. package/src/planner/marketModelPicker.ts +172 -0
  252. package/src/planner/optimizePageChart.ts +40 -0
  253. package/src/planner/optimizePageClaim.ts +64 -0
  254. package/src/planner/planCompleteness.ts +27 -0
  255. package/src/planner/planContextCore.ts +26 -0
  256. package/src/planner/planner.css +2304 -0
  257. package/src/planner/provenanceLinks.ts +25 -0
  258. package/src/planner/sections/AccountFields.tsx +872 -0
  259. package/src/planner/sections/AccountsSection.tsx +89 -0
  260. package/src/planner/sections/AllocationPanel.tsx +261 -0
  261. package/src/planner/sections/AssumptionsSection.tsx +256 -0
  262. package/src/planner/sections/HouseholdSection.tsx +243 -0
  263. package/src/planner/sections/IncomeFloorSection.tsx +418 -0
  264. package/src/planner/sections/IncomeSection.tsx +170 -0
  265. package/src/planner/sections/InsuranceSection.tsx +362 -0
  266. package/src/planner/sections/SpendingSection.tsx +904 -0
  267. package/src/planner/sections/StrategySection.tsx +349 -0
  268. package/src/planner/sections/UpdateBalancesPanel.tsx +182 -0
  269. package/src/planner/sections/sectionHelpers.ts +48 -0
  270. package/src/planner/sections/shared.tsx +15 -0
  271. package/src/planner/sections.tsx +15 -0
  272. package/src/planner/ssAnalysis.ts +325 -0
  273. package/src/planner/successBand.ts +20 -0
  274. package/src/planner/survivorAnalysis.ts +277 -0
  275. package/src/planner/usStates.ts +19 -0
  276. package/src/planner/useMcSuccessRate.ts +77 -0
  277. package/src/planner/useProjection.ts +63 -0
  278. package/src/relocation/messages.ts +21 -0
  279. package/src/relocation/relocation.worker.ts +18 -0
  280. package/src/relocation/runRelocation.ts +17 -0
  281. package/src/relocation/runner.ts +22 -0
  282. package/src/report/brandingContext.ts +15 -0
  283. package/src/report/downloadReport.ts +34 -0
  284. package/src/report/reportHtml.ts +547 -0
  285. package/src/routes/LearnRoutes.tsx +46 -0
  286. package/src/routes/PlanRoutes.tsx +55 -0
  287. package/src/routes/RouteFallback.tsx +9 -0
  288. package/src/socialSecurity/breakEven.ts +107 -0
  289. package/src/socialSecurity/expectedPv.ts +164 -0
  290. package/src/socialSecurity/explain.ts +92 -0
  291. package/src/socialSecurity/ficaReturn.ts +81 -0
  292. package/src/socialSecurity/persistedSsGuard.ts +138 -0
  293. package/src/socialSecurity/ssFormUtils.ts +48 -0
  294. package/src/socialSecurity/ssaStatementXml.ts +156 -0
  295. package/src/socialSecurity/storage.ts +69 -0
  296. package/src/socialSecurity/survivorSwitching.ts +153 -0
  297. package/src/testSupport/samplePlan.ts +2 -0
  298. package/src/workers/run.ts +45 -0
@@ -0,0 +1,99 @@
1
+ /**
2
+ * "Taxable brokerage cost basis and capital gains" - an Accounts and Saving P1 article.
3
+ */
4
+
5
+ import type { LearningArticle } from '../learningRegistry'
6
+
7
+ export const taxableBrokerageBasisAndCapitalGainsArticle: LearningArticle = {
8
+ slug: 'taxable-brokerage-basis-and-capital-gains',
9
+ title: 'Taxable brokerage cost basis and capital gains',
10
+ description: 'What basis is and why it changes the tax on selling investments.',
11
+ category: 'accounts-saving',
12
+ tags: ['taxable brokerage', 'cost basis', 'capital gains', 'realized gains', 'tax lots'],
13
+ audience: 'beginner',
14
+ status: 'ready',
15
+ lastReviewed: '2026-06-20',
16
+ reviewCadence: 'annual',
17
+ sourceUrls: [
18
+ 'https://www.irs.gov/taxtopics/tc409',
19
+ 'https://www.irs.gov/forms-pubs/about-publication-550',
20
+ ],
21
+ relatedArticles: [
22
+ 'account-types-overview',
23
+ 'ordinary-income-vs-capital-gains',
24
+ 'withdrawal-order-basics',
25
+ 'marginal-vs-effective-tax-rate',
26
+ 'tax-loss-and-gain-harvesting',
27
+ ],
28
+ relatedPlannerRoutes: ['/plan/:planId/accounts', '/plan/:planId/strategy', '/plan/:planId/results'],
29
+ currentYearSensitive: true,
30
+ priority: 'P1',
31
+ blocks: [
32
+ {
33
+ type: 'prose',
34
+ md: 'A taxable brokerage balance is not all taxed the same way. Part of the balance may be cost basis: money already taxed and invested. The rest may be unrealized gain. When you sell, the gain portion can become taxable capital gain.',
35
+ },
36
+ { type: 'heading', text: 'Quick takeaways' },
37
+ {
38
+ type: 'list',
39
+ items: [
40
+ 'Cost basis is the after-tax investment amount that usually comes back tax-free when shares are sold.',
41
+ 'Capital gain is generally the sale value above basis, subject to capital-gain rules.',
42
+ 'RetireGolden uses aggregate cost basis and realizes gains pro-rata when taxable investments are sold.',
43
+ ],
44
+ },
45
+ { type: 'heading', text: 'The basic idea' },
46
+ {
47
+ type: 'prose',
48
+ md: 'If a taxable account is worth $100,000 and its cost basis is $70,000, the account has $30,000 of unrealized gain. Selling part of the account does not mean the whole sale is taxable. It usually means part basis and part gain leave the account together.',
49
+ },
50
+ {
51
+ type: 'figure',
52
+ image: { src: '/learn/images/taxable-basis-capital-gains.webp' },
53
+ caption:
54
+ 'A taxable account contains both basis and gain; selling part of it can realize only the gain portion.',
55
+ alt: 'A taxable brokerage bucket is split into a basis layer and a gain layer, with a partial sale flowing through a capital-gain tax gate.',
56
+ },
57
+ {
58
+ type: 'formula',
59
+ expression: 'capital gain = sale proceeds - cost basis sold',
60
+ where: [
61
+ { symbol: 'sale proceeds', meaning: 'the amount received from selling the investment' },
62
+ { symbol: 'cost basis sold', meaning: 'the portion of original after-tax investment assigned to what was sold' },
63
+ ],
64
+ note: 'Real portfolios have tax lots and holding periods. RetireGolden uses aggregate basis as a planning simplification.',
65
+ },
66
+ { type: 'heading', text: 'A worked example' },
67
+ {
68
+ type: 'scenario',
69
+ name: 'The Harris household',
70
+ assumptions: [
71
+ { label: 'Taxable account value', value: '$300,000' },
72
+ { label: 'Aggregate cost basis', value: '$210,000' },
73
+ { label: 'Sale needed for spending', value: '$30,000' },
74
+ ],
75
+ summary:
76
+ 'The account is 70% basis and 30% gain. A pro-rata $30,000 sale would realize about $9,000 of gain in the simplified model, not $30,000 of taxable income.',
77
+ },
78
+ { type: 'heading', text: 'Why it matters in RetireGolden' },
79
+ {
80
+ type: 'prose',
81
+ md: 'The Accounts screen asks for taxable account cost basis. During projection, RetireGolden uses aggregate basis and realizes gains pro-rata as taxable holdings are sold. New taxable contributions add basis. This is useful for planning, but it does not replace brokerage-level tax-lot accounting.',
82
+ },
83
+ { type: 'heading', text: 'Common mistakes' },
84
+ {
85
+ type: 'list',
86
+ items: [
87
+ 'Entering market value as basis when the account has embedded gains.',
88
+ 'Leaving basis at zero, which can overstate taxable gains.',
89
+ 'Assuming every taxable withdrawal is ordinary income.',
90
+ 'Expecting RetireGolden to choose specific tax lots or optimize harvesting automatically.',
91
+ ],
92
+ },
93
+ { type: 'heading', text: 'Where to use this in the app' },
94
+ {
95
+ type: 'prose',
96
+ md: 'Use **Accounts** to enter taxable balance and cost basis. Then inspect **Results** for realized gains, MAGI, income tax, and withdrawal flows when taxable assets are sold.',
97
+ },
98
+ ],
99
+ }
@@ -0,0 +1,103 @@
1
+ /**
2
+ * "The three big questions: spending, time, and risk" - a Start Here P0 article.
3
+ */
4
+
5
+ import type { LearningArticle } from '../learningRegistry'
6
+
7
+ export const threeBigQuestionsSpendingTimeRiskArticle: LearningArticle = {
8
+ slug: 'three-big-questions-spending-time-risk',
9
+ title: 'The three big questions: spending, time, and risk',
10
+ description: 'The handful of inputs that drive almost every retirement outcome.',
11
+ category: 'start-here',
12
+ tags: ['spending', 'retirement timing', 'risk', 'assumptions', 'planning basics'],
13
+ audience: 'beginner',
14
+ status: 'ready',
15
+ lastReviewed: '2026-06-20',
16
+ reviewCadence: 'stable',
17
+ sourceUrls: [],
18
+ relatedArticles: [
19
+ 'how-to-read-a-retirement-projection',
20
+ 'todays-dollars-vs-future-dollars',
21
+ 'what-retiregolden-models',
22
+ 'how-assumptions-change-the-answer',
23
+ 'sequence-of-returns-risk',
24
+ ],
25
+ relatedPlannerRoutes: [
26
+ '/plan/:planId/household',
27
+ '/plan/:planId/spending',
28
+ '/plan/:planId/assumptions',
29
+ '/plan/:planId/results',
30
+ '/plan/:planId/monte-carlo',
31
+ ],
32
+ currentYearSensitive: false,
33
+ priority: 'P0',
34
+ blocks: [
35
+ {
36
+ type: 'prose',
37
+ md: 'Most retirement planning details eventually point back to three questions: how much you spend, how long the plan must run, and how much uncertainty the plan can absorb. If those three inputs are fuzzy, every later result is fuzzier too.',
38
+ },
39
+ { type: 'heading', text: 'Quick takeaways' },
40
+ {
41
+ type: 'list',
42
+ items: [
43
+ 'Spending usually drives the size of the problem more than any single tax detail.',
44
+ 'Time includes retirement age, claim age, planning age, and survivor years.',
45
+ 'Risk is not one number. It includes markets, inflation, longevity, healthcare, taxes, and flexibility.',
46
+ ],
47
+ },
48
+ { type: 'heading', text: 'The basic idea' },
49
+ {
50
+ type: 'prose',
51
+ md: 'A retirement plan is not mainly a prediction. It is a stress test of a lifestyle across time. Spending tells the plan what must be funded. Time tells the plan how many years the funding must last. Risk tells the plan how much bad luck could arrive before the answer breaks.',
52
+ },
53
+ {
54
+ type: 'figure',
55
+ image: { src: '/learn/images/three-big-questions.webp' },
56
+ caption:
57
+ 'Spending, time, and risk form the core triangle underneath the rest of the retirement plan.',
58
+ alt: 'Three large illustrated pillars for spending, time, and risk support a retirement path with account, tax, and healthcare icons above it.',
59
+ },
60
+ {
61
+ type: 'table',
62
+ caption: 'The three questions underneath most retirement choices.',
63
+ columns: ['Question', 'What it controls', 'Where people get tripped up'],
64
+ rows: [
65
+ ['Spending', 'How much the plan must fund each year', 'Using a current budget that ignores taxes, healthcare, repairs, travel, or one-time goals'],
66
+ ['Time', 'How many years income, withdrawals, inflation, and survivor rules run', 'Planning to life expectancy instead of a prudent planning age'],
67
+ ['Risk', 'How much uncertainty the plan can absorb', 'Looking at a single result and missing weak paths'],
68
+ ],
69
+ },
70
+ { type: 'heading', text: 'A worked example' },
71
+ {
72
+ type: 'scenario',
73
+ name: 'The Nolan household',
74
+ assumptions: [
75
+ { label: 'Spending', value: '$95,000 per year before healthcare surprises' },
76
+ { label: 'Time', value: 'Retire at 63, plan through one spouse reaching 96' },
77
+ { label: 'Risk', value: 'Moderate portfolio with 82% Monte Carlo success in the first pass' },
78
+ ],
79
+ summary:
80
+ 'Before debating Roth conversions or claim timing, the Nolans need to know whether **$95,000**, a 33-year horizon, and 82% success are a workable starting point.',
81
+ },
82
+ { type: 'heading', text: 'Why it matters in RetireGolden' },
83
+ {
84
+ type: 'prose',
85
+ md: 'RetireGolden lets you edit these three questions directly. Spending lives in **Spending**. Time lives across **Household**, **Social Security**, and account strategy choices. Risk shows up in **Assumptions**, **Monte Carlo**, **Scenarios**, and **Optimize**.',
86
+ },
87
+ { type: 'heading', text: 'Common mistakes' },
88
+ {
89
+ type: 'list',
90
+ items: [
91
+ 'Treating the first plan as the answer instead of a baseline.',
92
+ 'Fine-tuning tax strategy before the spending number is credible.',
93
+ 'Using one planning age for a couple and ignoring survivor years.',
94
+ 'Assuming a good median result means the plan is resilient.',
95
+ ],
96
+ },
97
+ { type: 'heading', text: 'Where to use this in the app' },
98
+ {
99
+ type: 'prose',
100
+ md: 'Start with **Household**, **Spending**, and **Accounts**. Then read **Results** for the baseline, **Monte Carlo** for risk, and **Scenarios** for what changes the answer most.',
101
+ },
102
+ ],
103
+ }
@@ -0,0 +1,92 @@
1
+ import type { LearningArticle } from '../learningRegistry'
2
+
3
+ export const tipsLaddersArticle: LearningArticle = {
4
+ slug: 'tips-ladders',
5
+ title: 'TIPS ladders: a guaranteed real income floor',
6
+ description:
7
+ 'How a ladder of inflation-protected Treasuries turns a lump sum into guaranteed inflation-adjusted income — and how RetireGolden prices, taxes, and stress-tests one inside your plan.',
8
+ category: 'risk-uncertainty',
9
+ tags: ['tips', 'income floor', 'inflation', 'bonds', 'safety-first', 'ladder', 'real yield'],
10
+ audience: 'intermediate',
11
+ status: 'ready',
12
+ lastReviewed: '2026-07-08',
13
+ reviewCadence: 'annual',
14
+ sourceUrls: [
15
+ 'https://home.treasury.gov/resource-center/data-chart-center/interest-rates',
16
+ 'https://www.treasurydirect.gov/marketable-securities/tips/',
17
+ 'https://www.irs.gov/publications/p550',
18
+ 'https://www.bogleheads.org/wiki/TIPS_ladder',
19
+ ],
20
+ relatedArticles: ['social-security-bridge', 'funded-ratio', 'inflation-risk', 'pensions-and-annuities', 'cola-and-inflation-protection'],
21
+ relatedPlannerRoutes: ['/plan/:planId/income-floor', '/plan/:planId/results'],
22
+ currentYearSensitive: true,
23
+ priority: 'P1',
24
+ featured: false,
25
+ blocks: [
26
+ {
27
+ type: 'prose',
28
+ md: 'A **TIPS ladder** is a set of Treasury Inflation-Protected Securities chosen so that one bond matures each year, and each maturity (plus the interest the others pay that year) delivers the same amount of **real** — inflation-adjusted — income. Buy the ladder once, and the income arrives on schedule no matter what stocks, rates, or inflation do. It is the closest thing an individual can buy to a DIY inflation-indexed pension, with no insurance company involved.',
29
+ },
30
+ { type: 'heading', text: 'Quick takeaways' },
31
+ {
32
+ type: 'list',
33
+ items: [
34
+ '**Guaranteed and inflation-proof**: both principal and coupons index to CPI, and the ladder is backed by the U.S. Treasury — the two risks a bond ladder usually leaves open (inflation and default) are both covered.',
35
+ '**Priced by real yields**: at a ~2.7% long real yield, a 30-year ladder costs roughly 20½ times its annual payout — about a **4.8–4.9% real withdrawal rate**, comfortably above the ~4% rule of thumb for portfolios. When real yields fall, the same income costs more.',
36
+ '**The trade**: the money is committed. A ladder rung spent this year cannot also compound in stocks; the ladder ends when its last rung matures (no longevity pooling like an annuity).',
37
+ '**Tax texture matters**: TIPS interest and the annual inflation adjustment are **federally taxable but exempt from state income tax** — and the inflation adjustment is taxed before you see the cash ("phantom income"), which is why many holders keep TIPS in tax-advantaged accounts. RetireGolden models the taxable-brokerage version, where the state exemption and phantom income actually bite.',
38
+ ],
39
+ },
40
+ { type: 'heading', text: 'How RetireGolden builds one' },
41
+ {
42
+ type: 'prose',
43
+ md: 'On the **Income floor** page you give a target real income, a first payout year, and a last payout year. RetireGolden solves the rung sizes back-to-front — the final year is funded by its maturing bond alone; earlier years by their maturing bond plus the coupons of every rung still outstanding — and prices each rung on an embedded Treasury real-yield curve (the "curve as of" date is shown next to every quote).\n\nThe cost you see is a planning-grade quote, not a brokerage order: coupons pay annually, rungs are par bonds at the interpolated curve yield, and there is no CUSIP-level lot rounding. An optional live-price mode can fetch actual Treasury (FedInvest) closing prices for comparison — it never runs without your click, and the plan itself always works offline on the embedded curve.',
44
+ },
45
+ {
46
+ type: 'formula',
47
+ expression: 'ladder cost ≈ annual real income × Σ 1 ÷ (1 + r)ᵗ for t = 1…years',
48
+ where: [
49
+ { symbol: 'r', meaning: 'the real (above-inflation) Treasury yield at each maturity' },
50
+ { symbol: 't', meaning: 'years until each rung matures' },
51
+ ],
52
+ basis: 'today',
53
+ note: 'With a flat curve this is exactly the level-annuity present-value factor; the app uses the full curve shape.',
54
+ },
55
+ { type: 'heading', text: 'What happens inside your plan' },
56
+ {
57
+ type: 'prose',
58
+ md: 'The ladder is not a side calculation — its cash flows live inside the same yearly ledger as everything else. The purchase leaves your chosen cash or brokerage account in the purchase year (realizing capital gains pro-rata if it sells appreciated holdings). Each year after that, coupons and any maturing principal arrive as income; the taxable slice (coupons plus that year\'s inflation accretion) flows through federal tax, the Social Security taxability formula, IRMAA, and ACA credits like any other ordinary income — while the state return excludes it. The unmatured rungs ride in your net worth as a dedicated asset the withdrawal engine never raids.',
59
+ },
60
+ {
61
+ type: 'callout',
62
+ tone: 'note',
63
+ md: 'RetireGolden models ladders held in **taxable** accounts. TIPS inside an IRA are just part of that account\'s balance — model those with the account\'s own allocation instead. The phantom-income and state-exemption mechanics only exist on the taxable side.',
64
+ },
65
+ { type: 'heading', text: 'Ladder, annuity, or portfolio?' },
66
+ {
67
+ type: 'table',
68
+ caption: 'Three ways to fund essential spending',
69
+ columns: ['', 'TIPS ladder', 'Income annuity (SPIA)', 'Stock/bond portfolio'],
70
+ rows: [
71
+ ['Inflation protection', 'Exact (CPI-indexed)', 'Only if you buy a COLA rider', 'Expected, not guaranteed'],
72
+ ['Longevity protection', 'Ends at the last rung', 'Pays for life', 'Depends on markets'],
73
+ ['What heirs get', 'Unmatured rungs', 'Usually nothing (life-only)', 'Whatever remains'],
74
+ ['Guarantee', 'U.S. Treasury', 'Insurer (state guaranty funds)', 'None'],
75
+ ['Liquidity', 'Sellable, at market prices', 'Irreversible', 'Full'],
76
+ ],
77
+ },
78
+ {
79
+ type: 'prose',
80
+ md: 'These are complements, not rivals: a common safety-first shape is a ladder covering the years to 85, a deferred annuity or delayed Social Security covering beyond, and the portfolio funding everything discretionary. The [funded ratio](/learn/funded-ratio) is the lens for deciding how much floor to lock in.',
81
+ },
82
+ { type: 'heading', text: 'Honest boundaries' },
83
+ {
84
+ type: 'list',
85
+ items: [
86
+ '**Planning-grade pricing**: annual coupons, par-bond rungs, no auction/secondary spread. Real quotes (tipsladder.com, your brokerage) will differ by small amounts.',
87
+ '**Curve staleness**: the embedded curve refreshes with the annual parameter packs; the "curve as of" date is always shown. Real yields move — re-quote before you buy.',
88
+ '**OID precision**: the phantom-income model (accretion taxed in the year it accrues) is the standard planning simplification of TIPS OID rules, not a Form 1099-OID reproduction.',
89
+ ],
90
+ },
91
+ ],
92
+ }
@@ -0,0 +1,107 @@
1
+ /**
2
+ * "Today's dollars vs future dollars" — a Start Here P0 article.
3
+ *
4
+ * Evergreen and concept-first: it uses a single illustrative ~3% inflation
5
+ * example (date-stamped as illustrative, not a rule), so it carries no source or
6
+ * annual-review obligation. It doubles as the showcase that exercises every
7
+ * rich content block: figure, formula, scenario, and table.
8
+ */
9
+
10
+ import type { LearningArticle } from '../learningRegistry'
11
+
12
+ export const todaysDollarsArticle: LearningArticle = {
13
+ slug: 'todays-dollars-vs-future-dollars',
14
+ title: "Today's dollars vs future dollars",
15
+ description: 'Why the same dollar amount means different things over time, and how to read it in your plan.',
16
+ category: 'start-here',
17
+ tags: ['inflation', 'real dollars', 'nominal', 'purchasing power', 'today’s dollars'],
18
+ audience: 'beginner',
19
+ status: 'ready',
20
+ lastReviewed: '2026-06-19',
21
+ reviewCadence: 'stable',
22
+ sourceUrls: [],
23
+ relatedArticles: ['about-retiregolden', 'how-assumptions-change-the-answer', 'inflation-risk'],
24
+ relatedPlannerRoutes: ['/plan/:planId/assumptions', '/plan/:planId/results'],
25
+ currentYearSensitive: false,
26
+ blocks: [
27
+ {
28
+ type: 'prose',
29
+ md: 'A dollar in 30 years will not buy what a dollar buys today. When a plan shows a big future number, the first question to ask is: **is that in today’s dollars, or future dollars?** The answer changes what the number really means.',
30
+ },
31
+ { type: 'heading', text: 'Quick takeaways' },
32
+ {
33
+ type: 'list',
34
+ items: [
35
+ '**Future (nominal) dollars** are the actual dollar amounts in a future year — bigger, but each one buys less.',
36
+ "**Today's dollars** (also called **real dollars**) strip out inflation so you can compare to prices you know now.",
37
+ 'Neither is “right.” What matters is knowing which one you are looking at.',
38
+ ],
39
+ },
40
+ { type: 'heading', text: 'The basic idea' },
41
+ {
42
+ type: 'prose',
43
+ md: 'Inflation is the slow rise in prices over time. As prices rise, each dollar buys a little less. Over a few years the effect is small. Over a multi-decade retirement, it is large.\n\nThe chart below shows what a fixed $50,000 would buy over time if prices rise about 3% a year. The dollar amount on the bill never changes — but its buying power keeps shrinking.',
44
+ },
45
+ {
46
+ type: 'figure',
47
+ chartId: 'purchasing-power',
48
+ caption: 'Buying power of a fixed $50,000 over 30 years.',
49
+ alt: 'A line falling from $50,000 today to roughly $20,600 of buying power after 30 years, because prices rise about 3% a year.',
50
+ sourceNote: 'Illustrative, assuming about 3% inflation a year. Your plan uses your own inflation assumption.',
51
+ },
52
+ { type: 'heading', text: 'A quick formula' },
53
+ {
54
+ type: 'prose',
55
+ md: 'To convert a future amount back into today’s dollars, divide it by inflation compounded over the years between now and then:',
56
+ },
57
+ {
58
+ type: 'formula',
59
+ expression: "today's dollars = future dollars ÷ (1 + inflation)^years",
60
+ where: [
61
+ { symbol: 'future dollars', meaning: 'the nominal amount in some future year' },
62
+ { symbol: 'inflation', meaning: 'the average yearly price increase, e.g. 0.03 for 3%' },
63
+ { symbol: 'years', meaning: 'the number of years from now until that future year' },
64
+ ],
65
+ note: 'This simple version assumes one steady inflation rate. Real inflation varies year to year, which is why the app lets you set the assumption and re-runs the math each year.',
66
+ },
67
+ { type: 'heading', text: 'A worked example' },
68
+ {
69
+ type: 'scenario',
70
+ name: 'The Rivera household',
71
+ assumptions: [
72
+ { label: 'Spending need', value: '$50,000 a year in today’s dollars' },
73
+ { label: 'Years until retirement', value: '20 years' },
74
+ { label: 'Assumed inflation', value: 'about 3% a year' },
75
+ ],
76
+ summary:
77
+ 'In 20 years, covering the **same** lifestyle takes about **$90,000** of future dollars — not because the Riveras live larger, but because each dollar buys less.',
78
+ },
79
+ {
80
+ type: 'prose',
81
+ md: 'So a plan that shows “$90,000 of spending” in year 20 may describe the exact same life as “$50,000 today.” Seeing both framings keeps you from over- or under-reacting to a big number.',
82
+ },
83
+ {
84
+ type: 'table',
85
+ caption: 'The same retirement, shown two ways.',
86
+ columns: ['Framing', 'What the number is', 'Good for'],
87
+ rows: [
88
+ ["Today's dollars", 'Inflation removed, comparable to prices now', 'Judging whether a plan supports your lifestyle'],
89
+ ['Future (nominal) dollars', 'Actual dollar amounts in each future year', 'Matching account statements and tax brackets'],
90
+ ],
91
+ },
92
+ { type: 'heading', text: 'Why it matters in RetireGolden' },
93
+ {
94
+ type: 'prose',
95
+ md: 'You set the inflation assumption on the **Assumptions** screen, and the **Results** screen can show key figures in today’s dollars so they stay comparable to prices you recognize. When you read any projection, check which framing it uses before drawing a conclusion.',
96
+ },
97
+ { type: 'heading', text: 'Common mistakes' },
98
+ {
99
+ type: 'list',
100
+ items: [
101
+ 'Treating a large future balance as “rich” without converting it to today’s dollars.',
102
+ 'Comparing a today’s-dollars number against a future-dollars number — an apples-to-oranges mix.',
103
+ 'Assuming inflation is fixed; it is an assumption you can and should test.',
104
+ ],
105
+ },
106
+ ],
107
+ }
@@ -0,0 +1,113 @@
1
+ /**
2
+ * "Traditional vs Roth contributions" - an Accounts and Saving P0 article.
3
+ */
4
+
5
+ import type { LearningArticle } from '../learningRegistry'
6
+
7
+ export const traditionalVsRothContributionsArticle: LearningArticle = {
8
+ slug: 'traditional-vs-roth-contributions',
9
+ title: 'Traditional vs Roth contributions',
10
+ description: 'Pay tax now or later, and how to think about the trade-off.',
11
+ category: 'accounts-saving',
12
+ tags: ['traditional', 'roth', 'contributions', 'tax timing', '401k', 'ira'],
13
+ audience: 'beginner',
14
+ status: 'ready',
15
+ lastReviewed: '2026-06-20',
16
+ reviewCadence: 'annual',
17
+ sourceUrls: [
18
+ 'https://www.irs.gov/retirement-plans/plan-participant-employee/retirement-topics-contributions',
19
+ 'https://www.irs.gov/retirement-plans/401k-plans',
20
+ 'https://www.irs.gov/retirement-plans/roth-iras',
21
+ 'https://www.irs.gov/retirement-plans/retirement-plans-faqs-regarding-iras',
22
+ ],
23
+ relatedArticles: [
24
+ 'account-types-overview',
25
+ 'roth-conversion-basics',
26
+ 'marginal-vs-effective-tax-rate',
27
+ 'filling-a-tax-bracket-with-roth-conversions',
28
+ 'withdrawal-order-basics',
29
+ ],
30
+ relatedPlannerRoutes: ['/plan/:planId/accounts', '/plan/:planId/assumptions', '/plan/:planId/results'],
31
+ currentYearSensitive: true,
32
+ priority: 'P0',
33
+ blocks: [
34
+ {
35
+ type: 'prose',
36
+ md: 'A traditional contribution and a Roth contribution are two different tax-timing choices. Traditional usually tries to reduce taxable income now. Roth usually accepts tax now in exchange for more tax-free flexibility later, if the rules for qualified withdrawals are met.',
37
+ },
38
+ { type: 'heading', text: 'Quick takeaways' },
39
+ {
40
+ type: 'list',
41
+ items: [
42
+ 'Traditional is often attractive when today\'s marginal tax rate is high compared with the rate you expect in retirement.',
43
+ 'Roth is often attractive when today\'s rate is low, future rates may be higher, or tax-free flexibility is valuable.',
44
+ 'The best answer can change by year, especially around retirement, Social Security, Medicare, RMDs, and survivor years.',
45
+ ],
46
+ },
47
+ { type: 'heading', text: 'The basic idea' },
48
+ {
49
+ type: 'prose',
50
+ md: 'Traditional contributions usually move taxable income from today into the future. Roth contributions usually leave today\'s taxable income alone, but future qualified Roth withdrawals may avoid tax. The cleanest comparison asks: would I rather pay tax at today\'s marginal rate, or at the future rate that applies when I withdraw?',
51
+ },
52
+ {
53
+ type: 'figure',
54
+ image: { src: '/learn/images/traditional-vs-roth-contributions.webp' },
55
+ caption:
56
+ 'Traditional and Roth contributions are two tax-timing paths: tax later versus tax now.',
57
+ alt: 'A savings dollar reaches a fork. One path enters a traditional account before a future tax gate, and the other passes a current tax gate before reaching a Roth account.',
58
+ },
59
+ {
60
+ type: 'formula',
61
+ expression: 'better choice = lower lifetime tax cost, not lower tax this year',
62
+ where: [
63
+ { symbol: 'traditional', meaning: 'usually lowers taxable income now and creates taxable withdrawals later' },
64
+ { symbol: 'Roth', meaning: 'usually pays tax now and can create tax-free qualified withdrawals later' },
65
+ ],
66
+ note: 'This is a planning lens, not a universal rule. Eligibility, employer plan rules, cash flow, and current law all matter.',
67
+ },
68
+ { type: 'heading', text: 'A worked example' },
69
+ {
70
+ type: 'scenario',
71
+ name: 'The Moreno household',
72
+ assumptions: [
73
+ { label: 'Working years', value: '$180,000 household wages while both spouses work' },
74
+ { label: 'Contribution choice', value: '$12,000 pre-tax contribution saves current tax; Roth contribution does not' },
75
+ { label: 'First retirement years', value: 'Lower taxable income creates room to convert some pre-tax dollars later' },
76
+ ],
77
+ summary:
78
+ 'The pre-tax contribution can help most in the high-wage year. Later, a planned conversion can move dollars to Roth when the Morenos have more bracket room, so the answer can change by phase.',
79
+ },
80
+ { type: 'heading', text: 'Traditional vs Roth in a plan' },
81
+ {
82
+ type: 'table',
83
+ caption: 'The trade-off is mostly about tax timing.',
84
+ columns: ['Feature', 'Traditional contribution', 'Roth contribution'],
85
+ rows: [
86
+ ['Current taxable income', 'Often lower when the contribution is deductible or pre-tax', 'Usually unchanged by the contribution'],
87
+ ['Future withdrawals', 'Often ordinary income', 'Qualified withdrawals may be tax-free'],
88
+ ['RMD pressure', 'Traditional balances can create future RMDs', 'Roth IRAs do not create lifetime RMDs for the original owner'],
89
+ ['Flexibility', 'Can help manage taxes now', 'Can help manage taxes later'],
90
+ ],
91
+ },
92
+ { type: 'heading', text: 'Why it matters in RetireGolden' },
93
+ {
94
+ type: 'prose',
95
+ md: 'RetireGolden applies annual contribution inputs while the account owner has wages and caps modeled contributions by the parameter pack limits. Traditional and HSA contributions reduce taxable income in the projection; Roth contributions add to Roth basis but do not create the same current-year deduction in the ledger.',
96
+ },
97
+ { type: 'heading', text: 'Common mistakes' },
98
+ {
99
+ type: 'list',
100
+ items: [
101
+ 'Choosing Roth because "tax-free" sounds automatically better.',
102
+ 'Choosing traditional because this year\'s tax bill is the only number being watched.',
103
+ 'Comparing contribution amounts without considering whether the tax savings are also invested.',
104
+ 'Ignoring survivor years, when a surviving spouse may file under a smaller bracket structure.',
105
+ ],
106
+ },
107
+ { type: 'heading', text: 'Where to use this in the app' },
108
+ {
109
+ type: 'prose',
110
+ md: 'Enter annual traditional and Roth contributions in **Accounts**. Then compare plan versions in **Scenarios**: one with more traditional saving, one with more Roth saving, and one with traditional saving plus later Roth conversions.',
111
+ },
112
+ ],
113
+ }
@@ -0,0 +1,105 @@
1
+ /**
2
+ * "Troubleshooting surprising results" - a Using RetireGolden P2 article.
3
+ */
4
+
5
+ import type { LearningArticle } from '../learningRegistry'
6
+
7
+ export const troubleshootingSurprisingResultsArticle: LearningArticle = {
8
+ slug: 'troubleshooting-surprising-results',
9
+ title: 'Troubleshooting surprising results',
10
+ description: 'Common reasons a projection looks wrong and how to track it down.',
11
+ category: 'using-retiregolden',
12
+ tags: ['troubleshooting', 'results', 'inputs', 'projection', 'retiregolden'],
13
+ audience: 'intermediate',
14
+ status: 'ready',
15
+ lastReviewed: '2026-06-20',
16
+ reviewCadence: 'stable',
17
+ sourceUrls: [],
18
+ relatedArticles: [
19
+ 'reading-the-results-page',
20
+ 'how-assumptions-change-the-answer',
21
+ 'using-assumptions-and-provenance',
22
+ 'reports-csv-exports-and-sharing',
23
+ 'what-retiregolden-models',
24
+ ],
25
+ relatedPlannerRoutes: [
26
+ '/plan/:planId/results',
27
+ '/plan/:planId/assumptions',
28
+ '/plan/:planId/accounts',
29
+ '/plan/:planId/strategy',
30
+ '/plan/:planId/report',
31
+ ],
32
+ currentYearSensitive: false,
33
+ priority: 'P2',
34
+ blocks: [
35
+ {
36
+ type: 'prose',
37
+ md: 'A surprising result is usually a clue, not a verdict. The fastest fix is to trace the result back through the ledger: inputs, assumptions, taxes, withdrawals, and warnings.',
38
+ },
39
+ { type: 'heading', text: 'Quick takeaways' },
40
+ {
41
+ type: 'list',
42
+ items: [
43
+ 'Start with modeling notes and the first surprising year, not the final estate number.',
44
+ 'Check account types, owners, cost basis, retirement ages, and spending before tuning strategy.',
45
+ 'Use the CSV when the screen summary is not enough to explain the annual ledger.',
46
+ ],
47
+ },
48
+ { type: 'heading', text: 'The basic idea' },
49
+ {
50
+ type: 'prose',
51
+ md: 'Projection errors often come from a small input with a large ripple: an account marked traditional instead of Roth, a retirement age that starts wages too early or too late, a missing cost basis, an aggressive inflation assumption, or a strategy that creates MAGI pressure. Troubleshooting works best when you find the first year the output looks strange.',
52
+ },
53
+ {
54
+ type: 'figure',
55
+ image: { src: '/learn/images/troubleshooting-surprising-results.webp' },
56
+ caption:
57
+ 'Follow the first surprising year back to the inputs, assumptions, and rules that created it.',
58
+ alt: 'A magnifying glass inspects a retirement ledger, tracing a highlighted year back to account, tax, spending, and assumption controls.',
59
+ },
60
+ {
61
+ type: 'table',
62
+ caption: 'Common symptoms and first checks.',
63
+ columns: ['Symptom', 'First check', 'Likely screen'],
64
+ rows: [
65
+ ['Portfolio depletes earlier than expected', 'Spending, retirement age, one-time goals, and return assumptions', 'Spending, Household, Assumptions'],
66
+ ['Taxes spike in one year', 'Roth conversions, RMDs, capital gains, or one-time income', 'Strategy, Results'],
67
+ ['MAGI looks too high', 'Conversions, taxable gains, Social Security taxation, and recent MAGI seed', 'Results, Assumptions'],
68
+ ['Healthcare costs jump', 'Age 65 transition, ACA credit setting, IRMAA lookback, healthcare inflation', 'Spending, Assumptions, Results'],
69
+ ['A report or CSV does not match the screen view', 'Nominal vs today-dollar display', 'Results, Report'],
70
+ ],
71
+ },
72
+ { type: 'heading', text: 'A worked example' },
73
+ {
74
+ type: 'scenario',
75
+ name: 'The Adams household',
76
+ assumptions: [
77
+ { label: 'Surprise', value: 'Taxes jump sharply at age 73' },
78
+ { label: 'First ledger clue', value: '$48,000 RMD begins in the same year' },
79
+ { label: 'Next checks', value: '$600,000 traditional balance, conversion strategy, QCD setting, and filing status' },
80
+ ],
81
+ summary:
82
+ 'The tax spike is no longer mysterious once the table shows a **$48,000** RMD. The next step is checking why the traditional balance stayed that high.',
83
+ },
84
+ { type: 'heading', text: 'Why it matters in RetireGolden' },
85
+ {
86
+ type: 'prose',
87
+ md: 'The **Results** page combines charts, modeling notes, and a year-by-year table. The **Download CSV** button gives the nominal ledger for deeper inspection. The **Report** route gives a printable summary of inputs, assumptions, headline results, warnings, and the appendix.',
88
+ },
89
+ { type: 'heading', text: 'Common mistakes' },
90
+ {
91
+ type: 'list',
92
+ items: [
93
+ 'Fixing the strategy before checking whether the inputs are wrong.',
94
+ 'Reading today-dollar screen values beside nominal CSV values without noticing the basis.',
95
+ 'Ignoring model warnings because the headline number looks fine.',
96
+ 'Comparing two plans that use different assumptions and treating the strategy as the only change.',
97
+ ],
98
+ },
99
+ { type: 'heading', text: 'Where to use this in the app' },
100
+ {
101
+ type: 'prose',
102
+ md: 'Start in **Results**, find the first surprising year, and then move to the screen that owns the line item: **Accounts**, **Spending**, **Strategy**, **Assumptions**, or **Social Security**. Export the CSV when you need to audit the row outside the app.',
103
+ },
104
+ ],
105
+ }