Comments welcome please: digging deeper into the 180-day tax qualifying deadline for all visas, my understanding is that the 180 days are the total accumulated days spent within Thailand, summed across any and all visits, during any individual calendar year (1st January to 31st December).
That is, it is not, as most people seem to think, a single block of time where the counter begins whenever you last entered Thailand.
For example, here are two visits that do not individually qualify, but when summed, the total period is in excess of 180 days.
21 March to 13 July = 115 days
25 July to 31 December = 160 days
Total : 115 + 160 = 275 days.