It is true that thank you is more formal than thanks. It is difficult to say exactly when each one is appropriate. If I were being handed my degree certificate during a graduation ceremony, I would say thank you.
New words, one handy idiom, and a 2-minute quiz — delivered to your inbox to keep your streak alive.