Skip to content
Other

Focal Length Calculator

A comprehensive focal length calculator that works in all three directions: solve for focal length, object distance, or image distance from the thin-lens equation 1/f = 1/do + 1/di. Add a sensor (or camera chip) size to get the angle of view and field of view at your chosen distance, with a full show-your-work breakdown.

Your details

Choose which quantity to calculate. The other two become your inputs.
Distance from the subject to the lens. Must be positive (real object).
Distance from the lens to the sensor or film plane.
Pick your sensor to calculate angle of view and field of view. Leave as "None" for thin-lens results only.
Focal length (f)Standard / normal
49.323mm
Object distance (do)1,500mm
Image distance (di)51mm
Magnification (m)-0.034x
Optical power (1/f)20.2745D
Horizontal angle of view40.1deg
Vertical angle of view27.35deg
Diagonal angle of view47.36deg
Field of view (width)1,094.82mm
Field of view (height)729.88mm
Image typeReal, inverted, reduced
49.323 mm
Ultra-wide<24Wide24-35Normal35-70Telephoto70-135Long tele135-300Super tele300+

Focal length: 49.32 mm (Real, inverted, reduced).

  • Object distance 1,500 mm and image distance 51 mm give focal length f = (do x di) / (do + di) = 49.32 mm.
  • Magnification -0.034x: the negative sign means the image is inverted; |m| < 1 means it is smaller than the subject.
  • Optical power: 1 / 0.0493 m = 20.27 D.
  • With the selected sensor this lens captures a 40.1 deg horizontal angle of view and a field of view of 1,095 x 730 mm at the object distance.

Next stepKeep all distances in the same unit. Switch the "Solve for" dropdown to find object or image distance from a known focal length.

Formula

1f=1do+1di    f=dodido+di,AoV=2arctan ⁣(s2f)\dfrac{1}{f} = \dfrac{1}{d_o} + \dfrac{1}{d_i} \;\Longrightarrow\; f = \dfrac{d_o \, d_i}{d_o + d_i}, \quad \text{AoV} = 2\arctan\!\left(\dfrac{s}{2f}\right)

Worked example

Object distance 1500 mm, image distance 51 mm: f = (1500 x 51) / (1500 + 51) = 76,500 / 1551 = 49.3 mm. On a full-frame sensor (36 x 24 mm) this yields a horizontal angle of view of 2 x atan(36 / (2 x 49.3)) = 36.3 deg, and the field of view at 1500 mm is about 1092 mm wide, a classic "nifty fifty" framing.

The thin-lens equation and its three solve modes

The thin-lens equation, 1/f = 1/do + 1/di, relates the focal length f to the object distance do (subject to lens) and image distance di (lens to sensor or film). Rearranging: f = (do x di) / (do + di), do = 1 / (1/f - 1/di), or di = 1 / (1/f - 1/do). This calculator lets you pick which variable to solve for. The "thin lens" assumption treats the lens as a single plane with negligible thickness, a valid first-order model for most camera, projector, and machine-vision calculations. Provided all distances share the same unit, the result comes out in that unit: this tool works in millimetres throughout, the convention for camera lenses, and accepts centimetre or metre input that it converts automatically.

Angle of view and field of view

Angle of view (AoV) describes how wide a slice of the scene the lens captures, measured in degrees. For a thin lens it is AoV = 2 x arctan(sensor_dimension / (2 x f)), applied separately to the sensor width for horizontal AoV, the sensor height for vertical AoV, and the sensor diagonal for the diagonal AoV you sometimes see in spec sheets. A shorter focal length gives a wider angle; a longer one narrows the view like a telescope. Field of view (FoV) translates that angle into a physical measurement at the subject: FoV_width = 2 x do x tan(AoV_horizontal / 2). These are ideal values for an infinitely thin lens; real multi-element lenses have principal-plane offsets and distortion that shift the numbers slightly, so treat these as accurate planning figures rather than exact measurements.

Magnification, optical power, and image classification

The transverse magnification m = -di / do carries a minus sign because a real image formed by a converging lens is inverted. The magnitude shows the size ratio: |m| < 1 means the image is smaller than the subject (typical for photography), |m| = 1 means life size (macro), and |m| > 1 means enlarged (microscopy or projection). Optical power, measured in dioptres, is simply 1/f with f in metres: a 50 mm lens has a power of 20 D. The image type panel classifies the result as real or virtual, upright or inverted, and enlarged or reduced. A real image forms on the far side of the lens and can be projected onto a sensor or screen; a virtual image appears on the same side as the object and cannot be projected directly.

Sensor formats and crop factor

The sensor size determines both the angle of view and the effective "crop" relative to full frame. A full-frame sensor (36 x 24 mm) matches the classic 35 mm film standard. APS-C sensors are roughly 1.5-1.6x smaller, so a 50 mm lens behaves like a 75-80 mm equivalent. Micro Four Thirds (17.3 x 13 mm) has a 2x crop factor. Compact and phone sensors run from 1/2.5" (5.76 x 4.32 mm) down to 1/4" (3.6 x 2.7 mm), giving very long effective focal lengths even from physically short lenses. Use the "Custom sensor size" option for machine-vision cameras or any sensor not in the preset list.

Common sensor formats, dimensions, and crop factors

FormatWidth (mm)Height (mm)Crop factorTypical use
Full frame (35 mm)36241.0xPro DSLR / mirrorless
APS-C (Canon)22.314.91.6xCanon DSLR / mirrorless
APS-C (Nikon/Sony)23.515.71.5xNikon, Sony, Fujifilm
Micro Four Thirds17.3132.0xOlympus, Panasonic
1 inch13.28.82.7xHigh-end compact, drone
1/2" (CCTV)6.44.85.6xSecurity cameras
1/2.5" (phone)5.764.326.3xSmartphone main sensor
1/3" (webcam)4.83.67.5xWebcam, action cam

Sensor width and height in mm, crop factor relative to full frame (36 x 24 mm).

Frequently asked questions

Which three modes can this focal length calculator solve?

Use the "Solve for" dropdown to compute focal length from do and di (the standard mode), object distance from f and di (useful when you know your lens and image plane), or image distance from f and do (useful for projector and enlarger setup). In every case the output panel shows all three distances.

How is angle of view calculated, and why does it depend on sensor size?

Angle of view = 2 x arctan(sensor dimension / (2 x focal length)). The same 50 mm lens produces a 39.6 deg horizontal AoV on full frame (36 mm wide) but only a 25.4 deg AoV on a 1/2" CCTV sensor (6.4 mm wide). This is the "crop factor" effect: a physically smaller sensor uses only the central portion of the lens image circle, narrowing the captured scene.

Why is magnification negative for a real image?

The transverse magnification m = -di / do carries a minus sign because a converging lens flips the image: a real image formed on the far side of the lens is upside down relative to the subject. The magnitude gives the size ratio, so |m| = 0.034 means the image is 34x smaller than the object, which is typical for a 50 mm lens photographing a subject 1500 mm away.

What does optical power in dioptres mean for a camera lens?

Optical power is 1 / focal length in metres. A 50 mm lens has a power of 1 / 0.05 = 20 D. Dioptres are the standard unit for eyeglasses and contact lenses, where a +2 D lens corrects mild farsightedness. Camera lenses are rarely rated in dioptres, but the unit is useful in optics calculations and for comparing lenses across very different focal lengths.

Do all input distances need to be in the same unit?

Each distance field has its own unit selector (mm, cm, or m), so you can mix freely: the calculator converts everything to millimetres internally before applying the thin-lens equation. The outputs are always in millimetres, the universal convention for lens focal lengths.

How does field of view differ from angle of view?

Angle of view is an angular measure in degrees, independent of subject distance. Field of view is the physical width (or height) of the scene captured at a specific distance: FoV = 2 x do x tan(AoV / 2). A 50 mm full-frame lens has a fixed 39.6 deg horizontal AoV, but the field of view at 1 m is about 750 mm wide, at 3 m it is about 2250 mm, and at 10 m it is about 7500 mm.

Sources

Written by Grace Mbeki, MSc Data Scientist & Educator · Nairobi, Kenya

Turning everyday numbers into clear, actionable answers for the decisions that matter most.

Search 3,500+ calculators

Loading search…