🏆 US-Registered Digital Marketing Agency
Advertisement
Advertisement
IMAGE

Depth of Field Calculator — near limit, far limit and hyperfocal distance

Work out how much of a scene will be acceptably sharp from focal length, aperture, subject distance and a circle of confusion derived from your sensor format — with the convention it used stated on screen.

The format sets the sensor diagonal, which is what the circle of confusion is derived from.
This single choice changes every number below. There is no universally correct value.
Used only when the convention above is set to direct entry.
Actual focal length, not the full-frame equivalent.
Measured from the sensor plane to the point you focused on.
Total depth of field
 
0
Near limit
0
Far limit
0
Hyperfocal distance
0
Circle of confusion
In front
Behind
DoF vs distance
Tip: the popular rule that a third of the depth falls in front of the subject only holds at distances well short of the hyperfocal. Close in, the split approaches an even 50/50; far out, almost all of it falls behind. The bars show the real split for your settings.
Advertisement

A depth of field calculator tells you the range of distances that will look acceptably sharp in a photograph. Only one plane is ever truly in focus — everything else is a blur circle of some diameter, and depth of field is simply the zone where that circle is small enough that a viewer does not notice. Which means depth of field is not a property of the lens. It is a property of the lens, the sensor, the print size and the viewer's eyesight combined, and the number this or any other calculator returns depends on an assumption about all four.

Arb Digital publishes this in its free tools library alongside the aspect ratio calculator for framing decisions, the DPI and PPI calculator for output resolution, and the image file size calculator for planning storage before a shoot. This page performs optical geometry on numbers you type. It does not read a file, and it does not inspect an image's metadata — the image metadata viewer does that.

What This Depth of Field Calculator Does

It computes four things from your inputs: the near limit of acceptable sharpness, the far limit, the total depth between them, and the hyperfocal distance for that focal length and aperture. It also reports the circle of confusion it used, in millimetres, along with the convention that produced it — because that value is the hidden assumption behind every depth of field figure published anywhere, and calculators that do not state it are asking you to trust a number you cannot check.

The sensor selector sets the diagonal. The convention selector divides that diagonal to produce a circle of confusion. The default is the classic Zeiss criterion of diagonal ÷ 1500, which for a full frame 35mm sensor gives 0.0288mm — close to the 0.029mm or 0.030mm found in most published tables, all of which are rounded versions of the same derivation.

The split between the depth in front of the subject and the depth behind it is shown separately, because that ratio changes dramatically with distance and the rule of thumb most photographers carry is only correct in a narrow band.

How to Use It

  1. Pick the sensor format first. It determines the circle of confusion and therefore every subsequent number. A 50mm lens at f/2.8 gives noticeably less depth on full frame than on Micro Four Thirds at the same subject distance.
  2. Choose a convention that matches the output. Diagonal ÷ 1500 assumes a print viewed at a normal distance. If the image will be examined at 100% on a monitor, the stricter ÷ 1730 setting is closer to what you will perceive.
  3. Enter the actual focal length. Not the full-frame equivalent. If your lens says 25mm on a Micro Four Thirds body, enter 25 and select that sensor — entering 50 double-counts the crop.
  4. Measure the subject distance from the sensor plane. Most cameras mark it with a circle-and-line symbol on the top plate. At close range the difference between sensor plane and front element is a significant fraction of the distance.
  5. Compare the far limit against the hyperfocal figure. Once the subject sits at or beyond the hyperfocal distance, the far limit is infinity and the whole background is within the zone.

The Formula / How It's Calculated

Everything follows from the hyperfocal distance, which is the focus distance at which the far limit first reaches infinity:

H = f² ÷ (N × c) + f, where f is focal length in millimetres, N the f-number and c the circle of confusion in millimetres.

With H known, and s the subject distance in the same units, the limits are near = s(H − f) ÷ (H + s − 2f) and far = s(H − f) ÷ (H − s). When s is greater than or equal to H the denominator of the far limit becomes zero or negative and the far limit is infinity. Total depth of field = far − near.

Worked example, matching the values the page loads with. A full frame sensor has a diagonal of 43.267mm, so at the ÷1500 convention the circle of confusion is 0.02884mm. At 50mm and f/2.8, the hyperfocal distance is 2,500 ÷ (2.8 × 0.02884) + 50 = 30,953.9 + 50 = 31,003.9mm, or 31.00m. Focusing at 3,000mm gives a near limit of 3,000 × 30,953.9 ÷ (31,003.9 + 3,000 − 100) = 92,861,700 ÷ 33,903.9 = 2,739mm and a far limit of 92,861,700 ÷ (31,003.9 − 3,000) = 92,861,700 ÷ 28,003.9 = 3,316mm. Total depth of field is 577mm — 261mm in front of the subject and 316mm behind, a 45/55 split rather than the one-third that folklore promises. Stanford's CS178 course notes on depth of field derive the same relationships with an interactive treatment.

Advertisement

The Circle of Confusion Is a Choice, Not a Constant

This is the section that explains why two depth of field calculators disagree about the same shot, and it is worth reading before trusting any figure including this one.

The circle of confusion is the largest blur spot that still reads as a point to a viewer. Deriving it requires four assumptions: the visual acuity of the observer, the viewing distance, the size of the print, and therefore the enlargement factor from sensor to print. The classic derivation assumes a person with normal vision resolving about 5 line pairs per millimetre at 250mm, looking at an 8×10 inch print. Run those assumptions backwards through the enlargement from a 35mm frame and you get roughly diagonal ÷ 1500.

Change any assumption and the number moves. A viewer inspecting a 40-inch print from two feet needs a much smaller blur spot to be satisfied, which is what the ÷1730 setting approximates. Someone scrolling past the image on a phone needs a much larger one. Neither is wrong — they encode different viewing conditions.

The consequence is concrete. In the worked example, switching from ÷1500 to ÷1730 shrinks the circle of confusion from 0.0288mm to 0.0250mm, pushes the hyperfocal distance out to about 35.8m, and cuts total depth of field from 577mm to roughly 500mm. That is a 13% change from a setting most calculators never expose. Any depth of field figure quoted without its circle of confusion is incomplete, which is why this page prints the value it used in the results grid.

A further wrinkle: modern sensors frequently out-resolve these criteria. When the pixel pitch is smaller than the circle of confusion, the traditional value permits blur that is plainly visible at 100% magnification. Photographers who examine images at pixel level and conclude that depth of field calculators are optimistic have generally found this, not an error.

Diffraction Sets a Floor on Sharpness

The formulas above imply that stopping down always increases depth of field, and arithmetically they are right. Physically they stop being the whole story around f/11 to f/16 on most formats.

As the aperture narrows, light bending at the edge of the diaphragm spreads each point into an Airy disc whose diameter grows in direct proportion to the f-number. At some point that disc exceeds the circle of confusion, and from there the entire image — including the plane you focused on — is softer than the criterion allows. Depth of field is technically still expanding, but it is expanding a zone of uniformly reduced sharpness.

Where that crossover falls depends on the format, and smaller sensors reach it sooner because their circle of confusion is smaller in absolute terms. A Micro Four Thirds camera is usually diffraction-limited by f/8 to f/11, where a full frame body has room to f/16 and medium format further still. This is the practical reason landscape photographers on small formats focus-stack rather than simply stopping down: the additional depth past the diffraction limit costs more sharpness than it buys.

Focal length and distance both matter more than most people expect. Depth of field scales roughly with the square of the subject distance, so doubling the distance quadruples the depth. It scales inversely with the square of focal length at a fixed distance. That relationship is why a 200mm lens at 3 metres produces a sliver of sharpness while a 24mm lens at the same distance covers most of the scene — and why the two lenses framed to the same subject size behave far more similarly than the raw numbers suggest.

Hyperfocal Focusing and When It Backfires

Focusing at the hyperfocal distance maximises the depth of field that includes infinity: everything from half the hyperfocal distance to infinity falls inside the zone. For a landscape where the foreground matters and the horizon must be sharp, it is the single most efficient focus point available.

It backfires in two situations. First, when infinity genuinely needs to be critically sharp — distant mountains, stars, architectural detail on a far building. At the hyperfocal distance, infinity sits exactly on the boundary of acceptable sharpness, which means it is at the maximum permitted blur. If the far detail is the subject, focus on it rather than the hyperfocal point.

Second, when your circle of confusion assumption does not match the eventual output. Hyperfocal focusing puts the two ends of the scene at the very limit of the criterion, so it has no margin. Shoot hyperfocal at the ÷1500 convention and then print large, and both the foreground and the background are visibly soft. Photographers who habitually print big commonly focus at twice the calculated hyperfocal distance for exactly that reason — it sacrifices near-foreground depth to buy back margin at infinity. Stanford's companion notes on the Gaussian lens formula cover the underlying imaging geometry that all of this rests on.

Photography or product images that need to perform online?

Arb Digital builds fast sites where large images load quickly and rank — correct sizing, modern formats and a layout that does not shift while they arrive.

See Web Design Services Talk to Arb Digital

Common Mistakes to Avoid

  • Entering the full-frame equivalent focal length — pairing an equivalent figure with a crop sensor selection counts the crop factor twice and produces a depth of field far smaller than reality.
  • Ignoring the circle of confusion convention — it changes the answer by more than ten per cent, and a figure quoted without it cannot be reproduced or checked.
  • Measuring distance from the front of the lens — the formulas assume the sensor plane, and at close range that difference is a large share of the total distance.
  • Stopping down past the diffraction limit — beyond roughly f/11 on smaller formats the extra depth comes at the cost of overall sharpness across the whole frame.
  • Trusting the one-third rule at every distance — the front-to-back split runs from about 50/50 at close range to almost entirely behind the subject near the hyperfocal distance.

Related Free Tools From Arb Digital

Plan output dimensions with the aspect ratio calculator and the DPI and PPI calculator, estimate storage before a shoot with the image file size calculator, and size video captures with the video file size calculator. The image metadata viewer reads the aperture and focal length back out of a file you already shot, the image resizer and image compressor handle delivery, and the printing cost calculator covers the output side. Everything else is in the free online tools hub.

Frequently Asked Questions

Which circle of confusion convention does this calculator use?

By default the classic Zeiss criterion of sensor diagonal divided by 1500, which gives 0.0288mm on full frame. Stricter and more lenient divisors are selectable, as is a direct entry, and the value actually used is printed in the results grid so the figure can be reproduced.

Why do two depth of field calculators give different answers?

Almost always because they assume different circles of confusion. Moving from diagonal divided by 1500 to divided by 1730 changes total depth by more than ten per cent on the same shot. Any calculator that does not state its assumption is asking you to trust a figure you cannot verify.

What is the hyperfocal distance?

The nearest focus distance at which the far limit of acceptable sharpness reaches infinity. Focusing there puts everything from half that distance to infinity inside the zone, which is the largest total depth available when the background must be included.

Is a third of the depth of field really in front of the subject?

Only in a middle band of distances. Close to the lens the split approaches an even fifty-fifty, and as the subject approaches the hyperfocal distance almost all of the depth falls behind it. The calculator shows the actual split for your settings rather than the rule of thumb.

Does a crop sensor give more depth of field?

At the same actual focal length, aperture and subject distance, a smaller sensor gives slightly less depth because its circle of confusion is smaller. The familiar claim that crop sensors give more depth compares images framed identically, which requires a shorter focal length or a greater distance, and that change is what produces the extra depth.

Why does stopping down stop helping past a point?

Diffraction. As the aperture narrows, each point of light spreads into a disc whose size grows with the f-number, and once that disc exceeds the circle of confusion the whole frame softens. Smaller formats reach that point sooner, typically around f/8 to f/11.

Should I enter the equivalent focal length for a crop body?

No. Enter the actual focal length marked on the lens and select the matching sensor format. The calculator applies the crop through the sensor diagonal, so entering an equivalent figure as well would apply the same factor twice.

Does this tool read my photo file?

No. It performs optical geometry on values you type, so it works before a shot is taken. Reading aperture, focal length and other capture settings back out of an existing file is a different job handled by a metadata viewer.

Advertisement
Advertisement

Take it further