The two overlap heavily and are often interchangeable. The usual difference is direction: grateful tends to point at someone who did something for you ("grateful to my teacher"), while thankful tends to point at a situation that turned out well ("thankful the storm missed us"), often with relief in it. Neither is more correct.
The core difference
This is a difference of tendency, not of rule. Both express appreciation, and in most sentences either word works.
Where they pull apart
- grateful — appreciation aimed at a person or an act: I am grateful to you for the reference.
- thankful — appreciation for how things turned out, often with relief: I am thankful nobody was hurt.
You can be thankful that a diagnosis was benign without there being anybody to thank. That is the case where grateful fits least comfortably.
Grammar worth noting
Grateful takes to for the person and for for the thing: grateful to her for the loan. Thankful normally takes for or a that clause, and rarely takes a person: "thankful to her" is possible but unusual.
Choosing
If someone did something and you want to acknowledge them, grateful is the more natural word. If you are responding to an outcome, especially a near miss, thankful carries the relief better.
Frequently asked questions
Are grateful and thankful interchangeable?
Usually, yes. The difference is one of tendency: grateful leans towards a person who acted, thankful towards an outcome, often with relief.
Which do I use in a thank-you note?
Grateful, normally — you are acknowledging something a person did. "I am grateful to you for…" is the natural form.
Can you be thankful with nobody to thank?
Yes, and this is where the words separate most clearly. You can be thankful the results were clear without there being anyone responsible for it.