I've been to Thailand at least half a dozen times before in the last five years or so and each time was allowed to stay for 15 days and never calculated my exit date wrong and never overstayed.
So last month had 31 days and as an Australian on visa-exempt entry I can stay for 30 days. As usual I calculated that my exit date was one calendar date earlier than my entry date, in the following month. So my entry stamp was August 21, +30 days makes September 20, today, my exit date.
But this time they put a second date stamp on my entry stamp, with yesterday's date and sent me to another window. The lady at that window insisted that the day I was stamped into the country counts as day #1, leaving 29 more days, meaning the departure day will be two calendar dates earlier the following month in the case of a 31-day month.
My question is whether this has changed, whether it's documented anywhere, whether it's open to interpretation and depends on the person on the day that you get at immigration? I have a bad habit of leaving on the last day of my visa almost every time but never ran into this before. I thought I'd even asked a question about it here, but I can't find it. (Of course, once this was fully posted I was finally able to find it after all. Grr!)
Note 1: Ironically, a Canadian guy at my guesthouse advised me the day before that Thailand actually grants you one day of grace so you can actually leave without overstaying on your 31st day. I was sceptical and didn't take his advice.
Note 2: When I entered Cambodia, they stamped both my entry date and exit date. And they did calculate it the way I expected. Today plus thirty more days. This month having 30 days, the date I have to leave next month is the 20th and I arrived today, the 20th. That would be 31 days in the "new" Thai system. This shows that at least from country to country there is variation in how "30 days on arrival" is interpreted.