My understanding is that for settlement you can't be outside the UK more than 180 days in any rolling 12-month period. And for naturalization you can't be outside the UK more than 450 days in the 5-year period, nor more than 90 days in the 12 months before applying. (This is different for visas granted before 11 January 2018; read the first document linked above!)
Enter your trips in the fields provided. The chart shows, for each day, how many of the previous 365 days were spent outside the country.
Days outside in...
any 12-month period:
last 5 years:
last 12 months:
These are just examples, hit clear below to start from scratch!