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

View attachment 1716360512

I'm not looking at the math to be an exact science, just to be a guide.
I am aiming to end up somewhere from 9 to around 9.5 to 1. A few thousandths won't make a difference to me.
This made me laugh. Whats a few thousands when building an engine right?