There is one article by Ken Rockwell, fortunately absent his usual nonsense, that explains all this quite well....

http://www.kenrockwell.com/tech/focus.htm

Now, I happen to think that judicious use of DOF is far more important than such effects, and my 'nonmathy' way to go about this, which has served me extremely well with the mamiya 6: simply scale focus and this will ensure that you stop down enough... but not too much. When in doubt, take two shots. When in serious doubt, take three shots. Eat, drink and be merry.