How do you determine deck clearance in an engine using math?

Remember that calculating that is based on a crankshaft that theoretically has all the throws indexed perfect. I'll let yall guess if that's allways the case.