Basically the manufacturers know the size of frame that fits their customers. So go by that sizing if you have nothing better to go by. If this is an old vintage frame you can sometimes find that info in old catalogs that some have scanned and posted on the internet. Or some bike manufacturers have good archives that go far back and show that stuff.
As well you can look to see what components was originally on that bike. You might have to simply guess as to stem length and handlebar reach and drop. But you'll still come up with something that works.
Perfect won't happen though even if you are experienced. So don't dwell too much on exact formulas. The calculations and geometry info you get from various calculators and sites will be useful, but remember unless you are having a frame custom built to those measurements then you'll have to make concessions.
And that is where as a newb I had a problem with fit calculators. I was trying to find a bike that fit everyone of the measurement points it said. So just know that saddle height and your reach to the hoods will be the two most important things if this is a drop bar bike. Everything else is a minor issue.