The 90-day early filing rule
USCIS lets you file Form N-400 up to 90 days before you complete the continuous residence period: 5 years as a permanent resident, or 3 years if you have been married to and living with a US citizen. Filing one day too early gets the application rejected.
Other time requirements
You also need physical presence in the US for at least 30 months of the 5 years (18 months of 3 years for spouses), and 3 months living in the state or USCIS district where you apply. Long trips can break continuous residence, so check them before filing.
Frequently asked questions
What date do I use?
The "Resident since" date printed on your green card.
Can I file earlier than 90 days?
No. USCIS rejects applications filed before the early filing date.
Does this check physical presence?
No. It calculates the filing date only; count your days abroad separately.
Is my date saved?
No. Everything runs in your browser.
Sources
A planning tool. USCIS decides eligibility. Disclaimer.