Unfortunately, there isn't a way. Advice though, measure sitting upright with your feet 90 degrees to your body. Make sure you curl your toes back as far as possible, and are flexible enough to sit bold upright to give yourself the best opportunity. Believe me for us tall people, this will require a stretching routine and some training. When they did the medicals I observed at RAF Valley for my cadets who were going on a Hawk flight, they didn't even have a proper rig to measure them on, so they simply had 2 wooden chairs facing each other and measured them as I described, so its a good estimate.
I'm 6'4 and just scrape through provided I keep up with a stretching routine. It is very specific from person to person. See attached measurements for an idea - these are for the Hawk which is the smallest cockpit in the RAF at present, so I believe this would be the standard to meet. Don't quote me on it, but obviously if you fit these measurements, you should fit other aircraft fine.