You should plan it this way. I have been there multiple times, generally I go to Phuket for 1 day and visit the beaches and enjoy the culture. I spend two days at Krabi because it is less crowded and its a more chill place to be eat. The party scene is very good at Krabi and is certainly better than the other two places. I suggest that you go to Phi Phi Island for 2 days because there are a lot of activities over there ranging from full one day kayaking tours, to parasailing and island snorkelling. It is paradise for beach activities. You can easily skip Chiang Mai and enjoy the beaches. You can explore Thai culture is Phuket too but you can't enjoy beaches like Phi Phi anywhere else.
2 days each in Bangkok, Phuket & Krabi... 1 day in Phi Phi...Chiang Mai is amazing too...its a beautiful temple town with amazing night markets where local bands play live music...its up to you which places u want to visit as per your preference.
A day is suffice for each place, the good part about phi-phi island tour is u can do it from Phuket as well as Krabi..only if u don't wish to stay there overnight. since the tour usually ends by evening, you have more time to explore the city. Recently been there for 7days covering all these place, u can check my blog for itinerary.