It depends on your situation:
If you are married to a UK citizen, then the residency requirements for citizenship are:
- you hold ILR (no restriction on length of time held)
- you have lived in the UK for at least 3 years
- you have not been outside the UK for more than 270 days in the last 3 years (no more than 90 of those in the last 12 months)
If you are NOT married to a UK citizen, the residency requirements are:
- you have held ILR for at least 12 months
- you have lived in the UK for at least 5 years
- you have not been outside the UK for more than 450 days in the last 5 years (no more than 90 of those in the last 12 months)