This is not scientific, but I’d suggest adding a foot or two onto your height. If you want to find out exactly- measure the distance from the ground to where you are holding your hand up in the air comfortably. Since Cloths on Hangers hang down, you may be able to cheat up a little higher, but you do not want to be having to get on your tip toes to put cloths up.
You probably want to push the Maxium height of your closet rod, so that you may be able to fit two closet rods in the same closet and have two rows of closets.
Either way, the very High up space is not very useful, since it requires a foot stool to comfortably reach- that is why it is better many times to double the amount of hanger space by putting in two closet rods and maximizing your space for Shirts, Blazers, Suits, and Pants. These are the cloths you will wear every day.
If you have a bunch of cloths hanging on your rack now, measure from the rack to the lowest hanging clothing to determine how much clearance you will need of the bottom to properly space the closet rod. 40″ should be fine, but if you wear Large size this number may increase some.