If you are flexible with your travel dates, always consider that you can buy extremely cheap train tickets if you avoid travelling in the weekends and if you choose to travel during the low season.
If you don't feel like spending many hours in a train, you can consider travelling by plane. Especially if you have the possibility to book in advance, flying to Bangkok can be definitely cheap.
What are the departure and arrival stations in Chiang Mai and Bangkok?
Trains leave Chiang Mai from Chiang Mai and arrive at Sam Sen or Bangkok.
How long will it take you from Chiang Mai to Bangkok by train and when do the trains leave?
On average, it takes 13 hours and 1 minute to get to Bangkok by train, but you will need 10 hours and 35 minutes with the fastest trains. The first one is available at 06:11, whereas the last one leaves Chiang Mai at 18:11.