This question already has an answer here:

I want to be able to see a frame and 'calculate' (either mathematically or intuitively) the DoF of the picture to be taken.

The most basic variable would be the aperture; my question is do other variables also have effect on DoF? Especially the distance from sensor to object.

Suppose I want to photograph an object with dimensions X and my camera with aperture set on f/1.4 only focuses on half of the object. Can I change something other than the aperture to ensure the whole object is in focus?

marked as duplicate by ths, Philip Kendall, mattdm, AJ Henderson Aug 18 '17 at 14:26

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.


There are three main factor that determine the DOF:

  • Distance to the subject
  • Focal length
  • Aperture

There are useful online calculators to calculate the required distance to have the subject(s) within the DoF.

Regarding equations to calculate the Hyperfocal distance, near distance of acceptable sharpness, you can use the following formulas:


enter image description here

Near distance of acceptable sharpness

enter image description here

Far distance of acceptable sharpness

enter image description here


  • H is the hyperfocal distance, mm

  • f is the lens focal length, mm

  • s is the focus distance
  • Dn is the near distance for acceptable sharpness
  • Df is the far distance for acceptable sharpness
  • N is the f-number
  • c is the circle of confusion, mm



Mathematically i don't know these equations but the other way you can change you DoF is by changing your focal Length, using a prime lens and increasing and decreasing of the subject from the film plane.

Not the answer you're looking for? Browse other questions tagged or ask your own question.