Test your time outside the UK against the naturalisation absence rules: no more than 450 days in 5 years, and no more than 90 days in the final 12 months before you apply.
Absence limits are measured backwards from this date.
Most people wait 12 months after ILR before applying.
Enter your planned application date to check your eligibility.