With the TNT cannon you can blow yourself up to 20 meters in the "air" without getting damaged. Only the landing costs between 0 and 9 hearts (depending on where and how you land). You can use it without dying in all game modes if you enter with 10 hearts.
As I said, you can get up to 20 meters in the air with it.
If you stand exactly in the middle of the water hole before the explosion using the coordinates, you reach the maximum height and you don't suffer any fall damage (because you land back in the water hole. If you are a bit away from the center you get the maximum fall damage, because you land on the edge; and if you stand directly into such a TNT after lighting it, you will not be thrown as far up, but further out and only get some fall damage.
It's handy to build the TNT missile in a lake, since you don't get fallschdanen there.
Unfortunately you can't build it in "easy" and in Survival it's a bit expensive because of the 4 TNTs but you have a lot of fun with it.
Tip: It is better not to build the rocket on a mountain, because from there you can fall lower, (logical) and get more damage. - And: better to use in "Peaceful".