Here is another app, TrueDoF (Depth of Field) which is another app used by DSLR users to calculate exactly what range will be in focus in an image. It is also a very useful educational tool about depth of field. I think I have bought every app this developer makes - and they are not inexpensive. (I also have one called OptimumCSP (Camera Settings Pro) that is another way of calculating the best possible settings to use in a given situation to get the sharpest possible image)
Here is the main window of the app.
View attachment 112949
The right side vertical bar is where I have set the aperture of the iPhone lens ƒ1.8. The lens focal length is shown on the short bar on the far left. The other vertical bar shows the focus distance and how much will be in focus (the depth of field).
The red arrow is where the lens is focused - at about 2.75 metres. In this particular case it is set at the hyperfocal distance, which is the focus distance at which the back depth of field extends to infinity. At this position we mare getting the most possible depth of field by not wasting any of it out beyond infinity. We can see that the depth of field extends from infinity to 1.36 metres. This means that everything between infinity and 1.36 metres will be in acceptable focus.
Now watch what happens as the focus distance is brought closer.
View attachment 112951
The red arrow indicates the focus being brought closer. From 2.75 meters to about 1.6 metres. The main thing to notice here is how much smaller the total amount of depth of field has become. The focus distance is the only thing being changed as we progress closer and you can see what happens to the total amount of depth of field as we get closer.
Next we move the focus closer again.
View attachment 112952
Now we are focused at about 0.65 metre and look how much smaller the depth of field has become.
Now look at the closest focus position this calculator can display.
View attachment 112950
Look how small the depth of field has become. And it continues to get smaller the closer we get to the subject. For instance when using a macro lens.
In all of these examples we can see the larger amount of depth of field is behind the focal distance. Another thing it shows is that focusing on a very distant point in the image is not a good idea as it wastes a lot of the available depth of field.