By Ahsan Khowaja (CEO) · Updated 10 November 2026
On this page
- How to use the focal length calculator
- Focal length formula for framing a subject
- Focal length calculator by sensor size: lenses to fill the frame at 10 m
- Thin lens equation
- Two lens focal length calculator
- Focal length to zoom calculator
- Telescope focal length
- How to estimate focal length from an image
- Questions and answers
- Related calculators
How to use the focal length calculator
There are five modes. Camera mode comes first, and it asks for three things:
- The sensor size. Pick one from the list, or choose Custom and type the width and height in millimeters.
- Whether the subject should fill the frame across its width (a building, a group, a driveway) or its height (a standing person, a doorway).
- The subject size and the distance to it, in meters, feet or centimeters.
You get the lens you need, the full-frame lens that gives the same framing, how much of the scene fits along the other side of the frame, and the nearest common prime. Use it as a camera focal length calculator when you plan a shoot, choose a CCTV lens, or want to know if a lens you already own is long enough.
Optics homework and lens kits get the other four modes. "Thin lens" finds a focal length from the object and image distances, and "Where the image forms" runs the same equation the other way. "Two lenses together" combines a pair of lenses or adds a close-up filter. "Zoom ratio" turns a range such as 24–70 mm into one number.
Focal length formula for framing a subject
Focal length = sensor side × distance ÷ subject size
Use the sensor's width in mm when the subject has to fill the width, and its height when the subject has to fill the height. Distance and subject size can be in any unit. Just keep it the same one, because only their ratio counts.
It comes from a pair of similar triangles: the subject and its distance form one, the sensor and the lens form the other. To fill the 36 mm width of a 35 mm sensor with a subject 2 m wide from 10 m away, you need 36 × 10 ÷ 2 = 180 mm. An APS-C sensor 23.5 mm wide takes 23.5 × 10 ÷ 2 = 117.5 mm for the same shot, since a smaller sensor needs a shorter lens for the same framing. Stand twice as far back and the lens has to be twice as long. Simple.
Three more examples follow. They're the cases the calculator is tested against.
- A 4 m wide scene at 10 m, full frame (36 mm wide): 36 × 10 ÷ 4 = 90 mm. The nearest common prime is 85 mm, which is slightly wider, so take a step closer or crop a little. Don't go the other way and use a 100 mm: you can always crop a wider frame, but you can't add back what a longer lens left out. The frame is 2.67 m tall at that distance.
- A 1.8 m person, head to toe, at 6 m, APS-C (about 15.6 mm tall): 15.6 × 6 ÷ 1.8 = 52 mm. On full frame the same framing takes 24 × 6 ÷ 1.8 = 80 mm.
- An 8 m driveway at 12 m, 1/3-inch CCTV sensor (about 4.8 mm wide): 4.8 × 12 ÷ 8 = 7.2 mm. The view is 36.9° wide and 6 m tall at the gate.
Two limits apply. The formula assumes the subject is far away compared with the lens, which is true of almost everything except close-up and macro work. For those, the thin lens equation further down this page is the better method. Sensor sizes are also nominal and vary by a few tenths of a millimeter between models, so read the result as the lens to look for and don't trust it to two decimals.
Focal length calculator by sensor size: lenses to fill the frame at 10 m
Here is the lens that fills the frame's width with a subject 10 m away, on three common sensor sizes:
| Subject width | Full frame (36 mm) | APS-C (about 23.5 mm) | Micro Four Thirds (about 17.3 mm) |
|---|---|---|---|
| 20 m | 18 mm | 11.75 mm | 8.65 mm |
| 10 m | 36 mm | 23.5 mm | 17.3 mm |
| 5 m | 72 mm | 47 mm | 34.6 mm |
| 4 m | 90 mm | 58.75 mm | 43.25 mm |
| 2 m | 180 mm | 117.5 mm | 86.5 mm |
| 1 m | 360 mm | 235 mm | 173 mm |
Other distances scale in proportion: at 20 m every lens in the table doubles, and at 5 m it halves. To go the other way and see what angle a lens covers, use the field of view calculator.
Thin lens equation
In physics, the thin lens equation links a lens's strength to where the object sits and where its sharp image forms:
1/f = 1/do + 1/di
OpenStax University Physics, Thin Lenses derives it step by step. The terms are:
- f is the focal length: positive for a converging (convex) lens, negative for a diverging (concave) one.
- do is the object distance from the lens.
- di is the image distance: positive for a real image on the far side, negative for a virtual image on the same side as the object.
- Magnification is −di ÷ do. A negative value means the image is upside down.
- Lens power in dioptres is 1 ÷ f, with f in meters.
Take an object 30 cm from a lens that forms a sharp image 15 cm behind it. Then 1/f = 1/30 + 1/15 = 3/30, so f = 10 cm (10 dioptres). The image is half size and inverted. Move the object to only 5 cm from the same 10 cm lens and 1/di = 1/10 − 1/5 = −1/10, so di = −10 cm. That is a virtual, upright image twice the size, which is what you see through a magnifying glass.
Some textbooks use a sign convention where distances on the object side are negative, and write the equation as 1/f = 1/v − 1/u. Same physics. Only the signs of the inputs change, so use the convention your course uses, or the marks won't match even when the answer does.
Two lens focal length calculator
Two thin lenses in contact add their powers: 1/f = 1/f1 + 1/f2. Power in dioptres is 1,000 ÷ the length in mm, so two 100 mm lenses (10 dioptres each) make 20 dioptres together, which is a 50 mm lens. When the lenses are a distance d apart, the formula gains a term:
1/f = 1/f1 + 1/f2 − d ÷ (f1 × f2)
The same two 100 mm lenses 50 mm apart give 1/f = 0.01 + 0.01 − 0.005 = 0.015, so f = 66.67 mm. For two converging lenses, a gap makes the combination longer than it is with the lenses touching. These formulas hold for thin lenses only. Real camera lenses are thick, multi-element designs, so treat the result as an estimate for them.
Close-up filters are labelled in dioptres. So +1 is a 1,000 mm lens, +2 is 500 mm and +4 is 250 mm. Put a +2 filter on a 100 mm lens and 1/f = 1/100 + 1/500, so 83.33 mm, which lets the lens focus much closer. Stacking filters works the same way, but each extra layer of glass softens the corners, so one stronger filter usually beats two weak ones.
Focal length to zoom calculator
Divide a zoom's longest setting by its shortest and you have its ratio. That makes a 24–70 mm lens 70 ÷ 24 = 2.92×, and on full frame its view narrows from 73.7° to 28.8° across. Take a 100–400 mm lens. It's 4×, yet at 400 mm it frames 1/16 of the area it frames at 100 mm, because both the width and the height shrink by four.
Phone cameras label their lenses the same way, as multiples of the main camera's equivalent. If the main camera is about 24 mm equivalent, a "3×" lens is about 72 mm equivalent. Their real lengths are only a few millimeters, so compare the equivalents. And "10×" on a phone often means digital zoom past the longest lens, which crops the picture instead of magnifying it.
Telescope focal length
Multiply a telescope's aperture by its focal ratio and you have its focal length, so a 200 mm f/6 telescope works out at 200 × 6 = 1,200 mm. Put that number into the telescope mode of the field of view calculator with an eyepiece to get magnification and true field, or use it as the lens in camera mode to see what a camera will capture.
How to estimate focal length from an image
Easiest of all: read it. Cameras and phones save it in each photo's EXIF metadata, often with a "35 mm equivalent" figure as well. Our guides to seeing photo metadata and what EXIF data is show where to find it.
If the metadata is gone, measure something of known size and distance in the picture. Expect an estimate, not an exact figure, since the distance is usually a guess. Say an object 2 m wide, 20 m away, spans 1,000 of the image's 6,000 pixels on a sensor about 23.5 mm wide. On the sensor it is 1,000 ÷ 6,000 × 23.5 = 3.92 mm wide, so the lens was about 3.92 × 20 ÷ 2 = 39 mm.
