How the calculator decides your residence
The Statutory Residence Test is a cascade, and this tool runs it in the same fixed order HMRC uses. The automatic overseas test comes first. Fewer than 16 days as a leaver, or fewer than 46 as an arriver, and you are non-resident whatever your ties. Next the automatic UK test: 183 days or more and you are resident, again whatever your ties. Only when neither fires does the sufficient-ties test decide it, by weighing your ties against the day band you land in.
The counterintuitive part is that more days lower the bar. A leaver on 100 days needs 2 ties to be resident; the same leaver on 130 days needs only 1. That is why the calculator reports a boundary in both directions: the day count that flips your result, and the tie count that flips it.
Why ties matter as much as days
Two people can spend the identical 100 days in the UK and get opposite answers. The difference is ties. Each tie you hold moves you down one band, so a spouse in London or a flat kept available can turn a comfortable margin into residence. The calculator makes that visible: change a single tie and watch the verdict and the margin line change with it.
The country tie is the one that only applies to leavers. If you left the UK recently and still spend more midnights there than in any other single country, that counts against you. Arrivers never carry it, which is why the tool hides it when you pick Arriver.
What the margin line tells you
Most SRT calculators stop at a yes or no. This one adds the move that changes the answer. If you are non-resident, it names the day ceiling you can reach and the extra tie that would tip you over. If you are resident, it names the day cut and the tie you could drop to get back out. That is the line worth planning around, because the SRT rewards knowing your exact position before the tax year ends, not after.