---
title: "Count the days for the substantial presence test"
url: "https://ailawframework.com/practice/taxation/count-the-days-present-for-the-183-day-residency-test/united-states"
type: "task_jurisdiction_version"
site: "AI Law Framework"
id: "A26-PE20261022-6-US"
practice_area: "Taxation"
tier: "yellow"
lawyer_review: "required"
jurisdictions: ["US"]
last_reviewed: "2026-10-22"
---

# Count the days for the substantial presence test

> Build a three-year table: every day physically present in the current year, one-third of the days in the first preceding year, and one-sixth of the days in the second preceding year.…

Canonical page: https://ailawframework.com/practice/taxation/count-the-days-present-for-the-183-day-residency-test/united-states  
Last reviewed: 2026-10-22

Site index for agents: https://ailawframework.com/llms.txt

## Key facts

| Fact | Value |
| --- | --- |
| Practice area | [Taxation](https://ailawframework.com/practice/taxation.md) |
| Human involvement | Yellow: Lawyer and AI draft together |
| How AI is used | Build a three-year table: every day physically present in the current year, one-third of the days in the first preceding year, and one-sixth of the days in the second preceding year. Flag the result if the current year is under 31 days, even if the weighted total is 183 or more. |
| What the lawyer must review | The IRS substantial presence page requires both parts. The person must be physically present on at least 31 days during the current year, and on 183 days during the three-year period that includes the current year and the two years before it, counting all current-year days, one-third of the prior year, and one-sixth of the year before that. The page's example treats 120 days in each of 2023, 2024, and 2025 as 120 plus 40 plus 20, which is 180, so the person is not a resident under the test for 2025. Any part of a day in the United States counts, subject to the exceptions the page lists. This is not a single-year count of 183 days. |
| Written for | United States |
| Applies to | [Count the days present for the 183-day residency test](https://ailawframework.com/practice/taxation/count-the-days-present-for-the-183-day-residency-test.md) |

## Checking plan

- What the AI does: Build a three-year table: every day physically present in the current year, one-third of the days in the first preceding year, and one-sixth of the days in the second preceding year. Flag the result if the current year is under 31 days, even if the weighted total is 183 or more.
- Basis: Checked against the linked sources on 22 October 2026. Confirm the current instrument before reliance.

## Notes

- A green card holder can be a resident without meeting this count. Run the green card test as well.
- Do not count days the page tells you to exclude. Exempt individuals and medical-condition days need Form 8843.

## Sources

- [IRS: Substantial Presence Test](https://www.irs.gov/individuals/international-taxpayers/substantial-presence-test) (checked 2026-10-22)
- [IRS: U.S. tax residency – Green card test](https://www.irs.gov/individuals/international-taxpayers/alien-residency-green-card-test) (checked 2026-10-22)

*Practice guidance for planning and review. Confirm current primary sources and the requirements of the actual matter. This is general information, not legal advice.*
