If you have been a legal permanent resident of the United States for a minimum of five years, you can apply for US citizenship under the fundamental naturalization rule. US permanent residents have the legal right to apply for US citizenship ninety days before the completion of their permanent resident requirement. What this means is that you can apply for US citizenship 90 days before the fifth anniversary of your US permanent residency.
If you want to check when exactly you can apply for US citizenship, you can use the USCIS date calculator. To apply for the citizenship, you are required to fill the Form N-400 and submit it to the USCIS.
The USCIS will go through the information provided in the Form N-400 and then advise you to get a biometric appointment and attend a naturalization interview. During the interview, the immigration officer will also take your naturalization test and decide whether you qualify to be a US citizen.
Keep in mind that it may not be possible to go through all of these steps within 90 days. It is for this reason that the applicants are required to file their applications before their fifth anniversary as a permanent resident of the United States.
In case you have been a permanent resident for the last three years and are married to a US citizen, you can apply for US citizenship without waiting for the completion of five years as a permanent resident. Permanent resident married to US citizens can apply for citizenship after the third anniversary of their status as a permanent resident.
However, you would be required to also submit evidence of bona fide marriage at the time of filing your application. In case a divorce happens before the naturalization interview or oath ceremony, you may not get US citizenship after three years as a permanent resident.
Build your new life in the U.S.