Depth of field - Bing
You don't need to calculate the distance to a subject.
Several factors effect how deep, or shallow, DoF is.
Subject distance, lens focal length, lens aperture, image sensor size (or more accurately - apparent field of view (FoV)).
You just need to understand that DoF is a zone of acceptably sharp focus essentially parallel to the plane of the image sensor.
The sharpest point in the photo is right at the point of focus (PoF). The zone of acceptably sharp focus extends in front of and behind that PoF.
How rapidly the zone of acceptably sharp focus in front of and behind the PoF changes is a function of how deep or shallow the DoF is.
When DoF is deep the change is very gradual. When DoF is shallow the change is quicker.
The distribution of the DoF in front of and behind the PoF is also not constant and can vary from 505 in front and 505 behind the PoF to 30%/70% or more.
If you want a blurry background, the further from the subject the background is, the easier it is to make the background out of focus (OOF) by controlling DoF.