The clock starts when you are actually stamped in (day one) and finishes when you are stamped out, so what are your actual flight times? As
@Jo**
said, an overstay of less than 24 hours doesn't usually attract a fine (500 baht a day each). I had an early morning flight out once on day 31, but I managed to get through passport control before midnight, so no overstay.