Overstaying your visa in Thailand comes with the following consequences;
You incur a fine of 500 baht ($15)/ day of your overstay. The maximum fine is 20000 Baht ($600), its the maximum fine for overstaying in Thailand for 40 days or more.
Important: If you overstay your visa your passport will be stamped to indicate the violation. This can result in you being banned from Thailand. The longer the overstay, the longer the period you'll be banned from Thailand. However, if you overstay by less than 90 days and pay the fine, your passport is not stamped and you won't face any challenges when you want to come back to Thailand at a future date.
Overstaying your visa by more than 90 days results in a one year ban.
Overstaying your visa by 5 years or more can cause you to be banned for 10 years from Thailand.
Overstaying your visa for long periods also increases your chance of being arrested. If you are arrested then this can result in deportation or jail term.
Effect of Overstayed Visas on Visa Extensions in Thailand.
My advice would be to extend your visa a few days before your visa expires. Once you begin overstaying your visa the whole process of visa extension becomes slightly more complicated.
First, you'll have to pay the fine incurred for the number of days you overstayed.
Secondly, the number of days you overstayed are subtracted from your renewed visa. This means that if you had overstayed by 10 days you'll only get a maximum of 20 days once you extend your visa. ( Visas are extended only by 30 days)
In some cases though doing a visa run may be cheaper than extending your already expired visa. Visa runs also give you more days. You'll get a new visa ( 60 days) once you re-enter Thailand after crossing the border to neighboring countries and coming back.