Back to calculator
Immigration, Visa & Travel DocumentsGenerated accuracy model review: 2026-05-06

Tax Residency Substantial Presence Calculator accuracy and testing

This page documents how Calwarden builds trust for this calculator: source notes, regression-style default tests, limitations, assumptions, unit handling, rounding, and visible change history.

Formula source

  • Adjusted current-year days = current-year days - exempt current-year days. Weighted presence days = adjusted current-year days + first prior-year days / 3 + second prior-year days / 6. Planning status checks adjusted current-year days against the current-year minimum and weighted presence days against the weighted threshold.

Test cases

Default input regression check

Generated from the checked-in default inputs and calculate function.

Inputs

  • Current-Year Days: 120 days
  • First Prior-Year Days: 120 days
  • Second Prior-Year Days: 120 days
  • Exempt Current-Year Days: 0 days
  • Minimum Current-Year Days: 31 days
  • Weighted Threshold: 183 days

Expected outputs

  • Weighted Presence Days: 180 days
  • Adjusted Current-Year Days: 120 days
  • Days Above/Below Weighted Threshold: -3 days
  • Planning Status: Entered thresholds are not met

Known limitations

  • This calculator does not apply IRS forms, treaty tie-breakers, closer-connection exceptions, visa-specific exempt-individual rules, filing obligations, state tax residency, or tax advice.

Assumptions

  • The default formula uses a common substantial-presence-style weighting: current year + first prior year / 3 + second prior year / 6.
  • Exempt days are user-entered and are not validated by the calculator.
  • This calculator runs in your browser from the values you enter. It is a planning estimate only, not legal, tax, immigration, or official government advice.

Unit handling

  • Current-Year Days accepts values in days.
  • First Prior-Year Days accepts values in days.
  • Second Prior-Year Days accepts values in days.
  • Exempt Current-Year Days accepts values in days.
  • Minimum Current-Year Days accepts values in days.
  • Weighted Threshold accepts values in days.
  • Weighted Presence Days is displayed in days.
  • Adjusted Current-Year Days is displayed in days.
  • Days Above/Below Weighted Threshold is displayed in days.

Rounding rules

  • Number displays use up to 2 decimal places in the calculator UI.
  • Input precision follows configured step values where provided.

Version history

1.0.0 - 2026-05-06

Generated accuracy and testing page from the current tax-residency-substantial-presence-calculator calculator definition.

Change log

2026-05-06

Published default regression test documentation and metadata fallbacks for Tax Residency Substantial Presence Calculator.

Calculator transparency

Accuracy pages are generated from checked-in calculator definitions and can be upgraded with curated review metadata over time.

Use calculator