If you are tight, here's some tips..... also because you want to do everything possible to keep grades down.
Normal railroad clearances are measured from TOP OF RAIL, so that 22' current standard for doublestacks doesn't include track, roadbed, etc.
So if you know you're tight, drop out the roadbed, subroadbed, put the track right on the basic benchwork.
Then look at the top material you are trying to clear, same rules.... only in this case how thick is your benchwork plywood, foam, or whatever?
You can lay sectional track on .040-.060 styrene you know, to bridge a short distance underneath. I've got one spot where I did that by gluing C80 to styrene to get from side to side with the track underneath just clearing, same deal, take out the cork and go down to plywood level.
And finally, watch your era. PRR typical dimensions (possibly due to the wire on the NEC) were a solid 15', figure 16' top of rail to 'something'. So until you're running 'exceeds Plate C' stuff, you can live with that. That's the standard I use on my logging modules. I've got the good 20' on the main layout as I have hi-cubes and autoracks but no doublestacks in 1972.
My practical 'standard', if you can call it that, was to maintain 2" clearance between plywood to plywood bottom, that's allowing for cork roadbed and flextrack. And the other issue is getting your hand in there for track cleaning and god-forbid maintenance, I'd learned to make upper levels either have access hatches, removable scenery, or something, if there was ANYTHING under there I'd have to get to. And there always is. It isn't always equipment clearance that gets you.