To get the same framing of your subject using the same camera, you'll have to shoot from further back with,say, an 85mm lens than with a 50mm lens. The decrease in DoF from using an 85mm lens compared to a 50mm lens when both are used from the same distance is offset by the increase in DoF when using the same lens from a greater distance. In the end at most distances they usually offset each other almost exactly.
Assuming an 8x10 display size viewed from a distance of 12 inches, shooting from 20 feet with the 50mm lens at f/1.8 on a FF camera will give you a DoF of about 1.86 feet or 22.32 inches. Shooting from 34 feet with the 85mm lens at f/1.8 on a FF camera will give you a DoF of about 1.86 feet or 22.32 inches.
Assuming an 8x10 display size viewed from a distance of 12 inches, shooting from 10 feet with the 50mm lens at f/1.8 on a FF camera will give you a DoF of about 0.46 feet or 5.52 inches. Shooting from 17 feet with the 85mm lens at f/1.8 on a FF camera will give you a DoF of about 0.46 feet or 5.52 inches.
In both cases the total depth of field is the same when the 85mm lens is used from 1.7X the distance of the 50mm lens to get the same framing of the same subject as the 50mm lens. What does change is how much of that DoF is on front of and behind the point of focus.
At 20 feet, the 50mm lens distributes the DoF 0.89/0.97 feet in front of/behind the point of focus.
At 34 feet, the 85mm lens distributes the DoF 0.9/0.95 feet in front of/behind the point of focus.
At 10 feet the 50mm lens distributes the DoF 0.22/0.24 feet in front of/behind
the point of focus.
At 17 feet the 85mm lens distributes the DoF 0.23/0.23 feet in front of/behind the point of focus.
Please note: All distances are rounded to the nearest two significant digits to the right of the decimal, which can introduce rounding errors between the sum of the distances on each side of the point of focus and the total distance.
What aperture you need to use to get all of your subject within the depth of field depends upon:
- The focal length of the lens.
- The distance from the camera to the point on the subject you want to be most in focus. There's always only one distance that is truly in focus. The rest of what we call "depth of field (DoF)" is not actually in sharpest focus, but is close enough that our eyes can't tell the difference when the image is displayed at a specific size from a specific viewing distance. In short, depth of field is an illusion, although a very convincing one.
- Which way your subject is oriented in relation to the camera. If the longest edge is perpendicular to the optical axis of the lens you'll need much less DoF than if it is lying along the same direction as the lens' optical axis.
- The size you intend to display the image.
- The distance from which you intend the image to be viewed.