You may file Form N-400 ninety (90) calendar days before you complete your permanent residence requirement if your eligibility for naturalization is based upon being a:
- Permanent resident for at least 5 years; or
- Permanent resident for at least 3 years if you are married to a US citizen.
https://www.uscis.gov/forms/uscis-early-filing-calculator