You have a list of trips and you need the number: how many days were you really outside the country? This guide shows how to count days outside US for citizenship, step by step, with one full example worked out with code. The short rule: for each trip, subtract the departure date from the return date, then subtract 1, then add up the trips.

The rules behind each step are on the physical presence calculator page. This article shows them in use.

The rule USCIS uses to count days

The USCIS Policy Manual says: “USCIS will count the day that an applicant departs from the United States and the day he or she returns as days of physical presence within the United States for naturalization purposes” (Policy Manual, Vol 12, Part D, Ch 4). The N-400 instructions repeat it.

So only the days strictly between leaving and returning are days abroad:

days abroad = (return date minus departure date) minus 1

USCIS’s own example in the continuous residence chapter checks this. Leave January 1, 2010 and return January 2, 2011 and you have been outside “for exactly 1 year (365 days)”. The raw difference between those dates is 366. Minus 1 gives 365.

Step 1: Collect your trips and the window

You need two things before you count.

  1. Every trip in the last 5 years before the day you plan to file, with the exact date you left and the date you returned. If you are missing dates, the N-400 travel history guide lists where to look.
  2. The window itself: the 5 years ending on your filing date. (Filing as the spouse of a citizen? The window is 3 years and the number you need is 548 days.)

My example person is made up. Call her Ana. She has had her green card for years, and she plans to file on June 30, 2026. Her window starts on June 30, 2021. Counting both end dates, that window is 1,827 days. Some readings count 1,826. The gap is one day and does not change anything below.

Step 2: Count the days abroad for each trip

Here are Ana’s seven trips. I computed every number with Python, not by hand.

# Left Returned Where Return minus departure Days abroad
1 Dec 18, 2021 Jan 9, 2022 India 22 21
2 Aug 3, 2022 Aug 20, 2022 Mexico 17 16
3 May 12, 2023 May 20, 2023 Canada 8 7
4 Dec 20, 2023 May 18, 2024 India 150 149
5 Mar 6, 2025 Mar 24, 2025 Philippines 18 17
6 Dec 10, 2025 Jan 4, 2026 India 25 24
7 Apr 2, 2026 Apr 9, 2026 Mexico 7 6

Take trip 3 as a check. May 12 to May 20 is 8 days apart. Subtract 1 and you get 7 days abroad. May 12 and May 20 both count as days in the US, so the 7 days in between are the only ones that count against her.

Step 3: Add the trips and compare with 913

Ana’s days abroad add up to 21 + 16 + 7 + 149 + 17 + 24 + 6 = 240.

Now take the window and subtract:

Line Days
Days in the window (June 30, 2021 to June 30, 2026, both ends counted) 1,827
Days abroad (all 7 trips) 240
Days in the US 1,587
Needed on the 5-year path 913
Margin 674

She clears 913 with room to spare. The same math shows the most she could have spent abroad in this window: 1,827 minus 913 is 914 days. That is a total across the whole window, not a limit for any one trip or year.

If a trip began before the window started, only the days inside the window count. None of Ana’s trips do that, so her numbers need no trimming.

Step 4: Check each trip against 180 and 365

The 913 total is one test. A second test looks at each trip alone. The Policy Manual sorts a single absence like this:

Days abroad on one trip What it means
180 or fewer No presumption that you broke continuous residence
More than 180, less than 1 year USCIS presumes a break, and you can try to rebut it
1 year or more A break in continuous residence

Ana’s longest trip is 149 days, so none of her seven trips raises a flag. Rebuttal evidence, if you ever need it, includes keeping your US job, your family staying here, and keeping your home, and the continuous residence page covers it.

The 180 line is exact, so a day of error matters. Using the rule above, a trip leaving March 1, 2027:

Returns Return minus departure Days abroad Over 180?
August 29, 2027 181 180 No
August 30, 2027 182 181 Yes
August 31, 2027 183 182 Yes

Someone who only subtracts would see 181 on the first line and think the trip was already over 180.

The most common counting mistake

Hand-built spreadsheets tend to overcount in one of two ways.

  • Subtracting return minus departure and stopping. That counts one extra day for every trip.
  • Counting both the departure day and the return day as days abroad. That counts two extra days for every trip.

Here is what each method gives for Ana’s seven trips:

Method Total days abroad
USCIS rule (return minus departure, minus 1) 240
Return minus departure only 247
Both travel days counted as abroad 254

The error here is 7 to 14 days. For Ana it changes nothing. For a filer who is close to 913, or a trip close to 180, it can move the answer. Over 20 trips the error would be 20 to 40 days.

Count days outside US for citizenship in the calculator

Doing this by hand takes a spreadsheet and a lot of care. The N400 Calculator, which I built, does the same count in a few minutes and is free in your browser.

  1. Enter your green card date and choose the general path (913 days) or the spouse path (548 days).
  2. Select Add a trip and enter the date you left and the date you came back. If you are still abroad, tick “I haven’t come back yet” and enter your planned return date.
  3. Read Your trips. Each trip shows its days abroad and a flag if it passes 180 or 365.
  4. Read Physical presence to see the total against 913 or 548, and the earliest date you can file.

I ran Ana’s seven trips through the calculator’s engine and got the same 240 days abroad and 1,587 days in the US for a June 30, 2026 filing date. If you sign in with your email, it saves your trips and can email you a reminder when your filing date comes up.

The calculator checks the 913-day total, each trip against 180 and 365, and continuous residence. It cannot judge your rebuttal evidence, and it does not cover military filers, N-470 or removal orders. If your case is close to a line, ask an immigration attorney before you file.