Calculation catalog › Insights
Insight state relocation lifetime state tax savings
Sum over projection years of deflated (best zero-tax candidate state tax minus baseline state tax), floored at zero, for the best of FL, TX and WA.
Field: Lifetime state tax saved by relocating Unit: US dollars Basis: today's dollars (real) Computed by: Engine Status: Complete chain
Appears in: insights (state-relocation card impact after Preview "staying in ST costs about $X of lifetime state+local income tax")
Calculation records
-
Lifetime state-and-local tax saved by the best zero-tax relocation candidate Composition record, justified by derivation
Purpose: Today's-dollar lifetime state-and-local tax saved by moving to the best of FL, TX and WA versus staying put.
Statement: Among non-baseline sweep rows with error=null, the best candidate is the one with the lowest nominal lifetimeTaxesAndPenalties; replacement requires strict `<`, so an earlier shortlist row wins a tie. For that row and the id='baseline' row, savings = max(0, −sum_y deflate(y, candidateStateTax_y − baselineStateTax_y)) over the union of years, with a missing year treated as zero. Units: start-year dollars. Rounding: none on the sum; the display string rounds to whole dollars.
Formula:
savings = max(0, −sum_y deflate(y, S_cand,y − S_base,y)); union of years, missing = 0-
S_base,y, S_cand,y: Nominal state-plus-local tax in year y for baseline and the selected candidate (unit: usd) (domain: finite; absent years contribute 0) -
deflate(y, ·): Maps year-y nominal dollars to start-year dollars (unit: 1) (domain: > 0)
Timing: lifetime over the union of the two annual series; a start-year move defaults to July (split-year origin tax)
Rounding: the card publishes only formatWholeUsd(savings), a whole-dollar string (Math.round); the summed deflated delta is not published, so the evidence asserts the published figure and the worksheet states both the exact sum and the shown figure
Limits:
- Candidate selection uses all taxes and penalties; the savings identity uses state-plus-local tax only
- A failed sweep publishes no dollar figure (evaluate degrades to the screen-level card)
- Only the final sum is floored at zero, not each year's contribution
- The evidence constructs the sweep rows the worksheet states rather than running four ledgers
Provenance: derived by
codex, implemented bygrok.Independent review:
cursorGates (6 of 6 pass): fixture registers a test: pass; pins resolve: pass; families exist: pass; worksheet exists: pass; mutation receipt exists: pass; provenance independent: pass
Worksheet: insight-state-relocation-lifetime-state-tax-savings.md Mutation receipt: insight-state-relocation-lifetime-state-tax-savings.mutation.md
Evidence tests: stateRelocation.evidence.test.ts
Implemented in: stateRelocation.ts
Is the number of: insight-state-relocation-lifetime-state-tax-savings
-
Records that feed this number
-
Relocation lifetime state local tax Composition record, justified by derivation
Purpose: Total one candidate row's recorded annual state and local income tax.
Statement: projection/relocation.ts#compareRelocationCandidates sums a row's recorded nominal per-year state-plus-local income-tax lines over the complete projection to publish that candidate's lifetime state and local tax, with no stated rounding.
Formula:
lifetimeStateLocalTax = sum over years y of stateTaxByYear[y].tax-
stateTaxByYear[y].tax: Recorded state plus local income tax for year y (unit: nominal USD) (domain: nonnegative)
Timing: every recorded projection year of the row
Rounding: none stated
Limits:
- Scope is income tax only: federal tax, property tax, sales tax and cost of living are outside this quantity, the annual lines are nominal and are never discounted, and dropping the split or baseline year understates the total. The worksheet's per-year lines are supplied by a deterministic state-tax calculator injected at the createStateTaxCalculator seam, so the recording, the row assembly and the sum are the real code path while the per-state tax data itself is not exercised here. The published total is the driver sum over every recorded line, and the per-year series is that recording restricted to the run horizon; the two agree when every recorded line lies inside the horizon, which the test’s scenario satisfies and which no known code path violates.
Provenance: derived by
codex, implemented byclaude.Independent review:
cursorGates (6 of 6 pass): fixture registers a test: pass; pins resolve: pass; families exist: pass; worksheet exists: pass; mutation receipt exists: pass; provenance independent: pass
Worksheet: relocation-lifetime-state-local-tax.md Mutation receipt: relocation-lifetime-state-local-tax.mutation.md
Evidence tests: relocation.evidence.test.ts
Implemented in: relocation.ts
Is the number of: relocation-lifetime-state-local-tax
Feeds: insight-state-relocation-lifetime-state-tax-savings, scenario-comparison-cell
-
Engine source: engine/src/insights/detectors/stateRelocation.ts
(stateRelocation.evaluate (savings))
The evidence links on this page (each record's worksheet, mutation receipt, evidence tests
and implementation, and the source links) are pinned to engine commit
2624dbdba9fd, committed 2026-10-11.
The live calculation index and
output-family census links point at the repository's main
branch, so you can check this snapshot against them.