Architects don’t calculate that, engineers do. With modern engineering they can model everything in a computer simulation to get a pretty high confidence of stability. Even then things aren’t engineered to be just strong enough, they have safety factors of 3 or 4 times the required strength so even if the calculations are off there is still a lot of leeway. You have to cut a lot of corners in construction, missed some fundamental force in your simulations or use the structure for something it completely wasn’t designed for for it to fail.
Latest Answers