The 330-day physical presence test: how to count it
Short answer: you need 330 full days in a foreign country inside some 12-month period, and the period can start on any day. That leaves at most 35 days of the 365 for travel and the United States.
Everything below is arithmetic on invented dates. Not tax, legal or immigration advice. The foreign earned income exclusion has further requirements, including a tax home in a foreign country and foreign earned income. Check the current IRS figures.
A worked example
Four stays in Lisbon: 2024-09-15 to 2025-01-20, 2025-02-03 to 2025-05-30, 2025-06-12 to 2025-09-28 and 2025-10-05 to present (as of 2026-02-28), with $95,000 of foreign earned income for 2025.
The best 12-month window runs 2025-02-03 to 2026-02-02 and holds 347 full foreign days: 17 more than the 330 needed, so 35 days of that window could be spent elsewhere.
The first date any 12-month span holds 330 foreign days is 2025-09-04.
For 2025 the exclusion limit entered is $130,000. All 365 days of 2025 fall in a qualifying span, so the prorated limit is $130,000.00 and the whole $95,000.00 is excluded.
How to keep your count honest
Use full days only: remove the days you flew in or out of each stay.
Keep passport stamps, boarding passes and a calendar for every trip.
A short US trip eats into your 35 spare days; list each stay separately and see which window still holds 330.
Prorating: if your qualifying period covers only part of the tax year, the limit is cut by the share of the year it covers.
Common questions
How do I count a full day abroad?
A full day is a 24-hour period from midnight to midnight spent in a foreign country. The day you fly out and the day you land are not full days, and neither are days over international waters or in the United States.
Does the 12-month period have to be a calendar year?
No. It can start on any day. Try every start date and use the one with the most full foreign days, which is what the calculator does.
Is this tax advice?
No. It is arithmetic on invented dates. Check Form 2555 instructions or a qualified professional. No warranty.