The two eligibility clocks
Naturalization runs on two separate requirements that both have to be satisfied: continuous residence and physical presence. They sound similar but measure different things.
Continuous residence is about how long you've held your green card without a break: 5 years on the general path, or 3 years if you've been married to and living with a US citizen the entire time.
Physical presence is the raw count of days you were actually inside the US during that period: at least 913 days (30 months) for the 5-year path, or 548 days (18 months) for the 3-year path.
The 90-day rule almost nobody uses
You may file your N-400 up to 90 days before you reach your continuous-residence anniversary. So on the 5-year path you can file at 4 years and 9 months. This is a real head start — but it only advances continuous residence. Your physical-presence days and the 3-month state-residence requirement still have to be met as of your actual filing date.
How trips abroad can hurt you
Continuous residence can be broken by long absences:
An absence of more than 6 months but less than 1 year creates a rebuttable presumption that you broke continuous residence. You can overcome it by showing you kept your US ties — you didn't move your home, you kept your job, you filed US taxes as a resident, your family stayed.
An absence of 1 year or more breaks continuous residence outright, unless you filed and got an approved Form N-470 before you left. After a break, the clock generally restarts — roughly 4 years and 1 day (5-year path) or 2 years and 1 day (3-year path) from your return.
The rest of the checklist
You must be at least 18 at filing, have lived in your state or USCIS district for 3 months, and meet good moral character during the statutory period. There are English and civics tests at the interview. Those last items aren't date math, so a checker can't decide them for you — but the residence and presence numbers are exactly where people miscount.
Check your N-400 eligibility → Free checker: enter your green-card date and days present, and see the earliest date you can file.