Focal Length Calculator
Calculate the focal length of a lens using sensor size, angle of view, or subject distance
Calculation Results
Comprehensive Guide: How to Calculate Focal Length
Focal length is one of the most fundamental concepts in photography and optics, determining how much of a scene your camera can capture and how large individual elements appear. Whether you’re a professional photographer, an optics engineer, or simply a curious enthusiast, understanding how to calculate focal length can significantly enhance your ability to work with lenses and cameras.
What is Focal Length?
Focal length, measured in millimeters (mm), is the distance between the optical center of a lens (or its secondary principal point) and the camera’s image sensor when the lens is focused at infinity. It’s a critical specification that defines:
- Angle of view – How much of the scene the lens can capture
- Magnification – How large distant objects appear
- Perspective – The spatial relationship between objects in the image
Key Focal Length Ranges
- Ultra-wide: < 20mm
- Wide-angle: 20-35mm
- Standard: 35-70mm
- Telephoto: 70-300mm
- Super-telephoto: > 300mm
Focal Length vs. Sensor Size
The same focal length will produce different angles of view on different sensor sizes due to the crop factor.
- Full-frame (36×24mm): 50mm = standard
- APS-C (~23.6×15.7mm): 50mm ≈ 75mm equivalent
- Micro Four Thirds (17.3×13mm): 50mm ≈ 100mm equivalent
Mathematical Foundations of Focal Length
1. Basic Focal Length Formula
The fundamental relationship between focal length (f), object distance (u), and image distance (v) is given by the thin lens formula:
1/f = 1/u + 1/v
Where:
- f = focal length of the lens
- u = distance from the lens to the object (subject distance)
- v = distance from the lens to the image (typically the sensor plane)
2. Focal Length from Angle of View
When you know the angle of view (α) and the sensor width (W), you can calculate the focal length using:
f = W / (2 × tan(α/2))
This is the formula our calculator uses when you select the “Sensor Size & Angle of View” method.
| Sensor Format | Typical Width (mm) | 50mm Lens Angle of View | Crop Factor |
|---|---|---|---|
| Full-frame (35mm) | 36.0 | 46.8° | 1.0x |
| APS-H | 28.7 | 37.0° | 1.28x |
| APS-C (Canon) | 22.3 | 29.1° | 1.6x |
| APS-C (Nikon/Sony) | 23.6 | 31.0° | 1.5x |
| Micro Four Thirds | 17.3 | 23.2° | 2.0x |
| 1-inch | 13.2 | 18.2° | 2.7x |
3. Focal Length from Subject Distance and Image Size
When photographing an object where you know:
- The actual size of the object (S)
- The size of the object’s image on the sensor (s)
- The distance to the object (u)
You can calculate the focal length using:
f = (s × u) / S
This is particularly useful in macro photography where you might know the actual size of small subjects and how large they appear on your sensor.
Practical Applications of Focal Length Calculations
1. Lens Selection for Specific Scenes
Understanding focal length calculations helps photographers:
- Choose the right lens for architectural photography (typically 14-24mm on full-frame)
- Select appropriate telephoto lenses for wildlife (300mm+) or sports (70-200mm)
- Determine the best portrait lenses (85mm, 105mm, or 135mm for flattering compression)
2. Camera System Comparisons
When switching between camera systems with different sensor sizes, focal length calculations help maintain equivalent fields of view:
| Desired Full-Frame Equivalent | APS-C (1.5x) | Micro Four Thirds (2.0x) | 1-inch (2.7x) |
|---|---|---|---|
| 14mm (ultra-wide) | 9-10mm | 7mm | 5mm |
| 24mm (wide) | 16mm | 12mm | 9mm |
| 50mm (standard) | 35mm | 25mm | 18mm |
| 85mm (portrait) | 57mm | 43mm | 31mm |
| 200mm (telephoto) | 135mm | 100mm | 74mm |
| 400mm (super-telephoto) | 270mm | 200mm | 150mm |
3. Optical Design and Engineering
For optical engineers, precise focal length calculations are essential for:
- Designing lens systems with specific focal lengths
- Calculating the necessary curvature of lens elements
- Determining the appropriate spacing between lens groups
- Optimizing lens performance for different focal lengths
Advanced Considerations
1. Focus Breathing
Many lenses exhibit focus breathing – a change in focal length as the lens is focused at different distances. This is particularly noticeable in:
- Cinema lenses (where it’s often minimized)
- Fast prime lenses
- Zoom lenses at extreme focal lengths
For precise work, you may need to measure the actual focal length at your working distance rather than relying on the marked focal length.
2. Diffraction Limits
The diffraction limit imposes a fundamental constraint on how small you can make a lens for a given focal length while maintaining image quality. The diffraction-limited angular resolution (θ) is given by:
θ ≈ 1.22 × λ / D
Where:
- λ = wavelength of light (~550nm for green light)
- D = diameter of the lens aperture
This becomes particularly important when designing:
- Super-telephoto lenses (where physical size becomes impractical)
- Smartphone cameras (where sensor size is extremely small)
- Space telescopes (where weight is critical)
3. Thermal Effects
Focal length can change with temperature due to:
- Thermal expansion of lens elements
- Changes in refractive index with temperature
- Mechanical shifts in lens positioning
High-precision optical systems often require:
- Temperature compensation
- Active focusing systems
- Special low-expansion materials
Common Mistakes in Focal Length Calculations
- Ignoring sensor size: Forgetting to account for crop factors when comparing lenses across different camera systems.
- Confusing angle of view: Assuming the same focal length will always produce the same perspective (it won’t if you change your distance to the subject).
- Neglecting working distance: Not considering that macro lenses often have different effective focal lengths at close focusing distances.
- Overlooking lens designs: Assuming all lenses of the same focal length perform identically (retrofocus vs. telephoto designs behave differently).
- Misapplying formulas: Using the thin lens formula for complex multi-element lenses without considering their principal planes.
Tools and Resources for Focal Length Calculations
While our calculator provides quick results, several advanced tools can help with more complex scenarios:
- Optical design software: Zemax OpticStudio, CODE V, or OSLO for professional lens design
- Mobile apps: PhotoPills, SetMyCamera, or Simple DoF for field calculations
- Online calculators: Specialized tools for astrophotography, macro photography, or cinematography
- Manufacturer data: Lens specification sheets often include detailed optical diagrams
For those interested in the theoretical foundations, we recommend these authoritative resources:
- University of Arizona College of Optical Sciences – Comprehensive optical engineering resources
- NIST Optics Portal – National Institute of Standards and Technology optical physics references
- Edmund Optics Knowledge Center – Practical optical engineering guides and calculators
Frequently Asked Questions
How does focal length affect depth of field?
Longer focal lengths produce shallower depth of field at the same aperture, while shorter focal lengths produce deeper depth of field. This is why:
- 85mm portraits have beautifully blurred backgrounds
- 24mm landscape shots keep everything sharp
- Macro lenses (often 60-100mm) have extremely shallow depth of field
Why do zoom lenses have variable maximum apertures?
As you zoom a lens to longer focal lengths:
- The physical aperture size must increase to maintain the same f-number
- Optical constraints often make this impractical
- Many zoom lenses “stop down” at longer focal lengths (e.g., f/2.8-4)
High-end zooms maintain constant apertures through complex optical designs and larger front elements.
How does focal length relate to perspective?
Contrary to popular belief, focal length itself doesn’t create perspective – your distance to the subject does. However:
- Wide angles (short focal lengths) are typically used close to subjects, exaggerating perspective
- Telephotos (long focal lengths) are typically used far from subjects, compressing perspective
- The same perspective can be achieved with any focal length by adjusting your distance
What’s the difference between focal length and crop factor?
Focal length is a physical property of the lens. Crop factor describes how a smaller sensor “crops” the image circle projected by the lens:
- A 50mm lens is always a 50mm lens, regardless of the camera
- On a crop sensor, it will appear to have a longer focal length due to the smaller capture area
- The actual angle of view changes, but the optical properties remain the same
Can I calculate the focal length of my smartphone camera?
Yes, though it’s more complex due to:
- Extremely small sensors (typically 1/2.5″ to 1/1.7″)
- Fixed-focus or complex multi-lens systems
- Software processing that may alter the effective field of view
You can:
- Find your phone’s sensor size (e.g., 5.76mm for 1/2.5″)
- Measure the angle of view by photographing a known-size object at a known distance
- Use the angle of view formula to calculate the effective focal length
Most smartphones today have main cameras with equivalent focal lengths between 24-28mm.
Conclusion
Understanding how to calculate focal length opens up new possibilities in photography and optical engineering. From selecting the perfect lens for a specific shot to designing complex optical systems, these calculations form the foundation of working with light and lenses.
Remember that while formulas provide precise mathematical relationships, real-world optics often involve compromises. Lens designers must balance focal length with considerations like:
- Image quality across the frame
- Physical size and weight
- Manufacturing costs
- Autofocus performance
- Environmental durability
As you work with different focal lengths, you’ll develop an intuitive sense for how they affect your images. The calculator above provides a quick way to verify your understanding or plan specific shots, but nothing replaces hands-on experience with different lenses in various situations.
For those interested in diving deeper, consider exploring:
- The relationship between focal length and lens speed (f-number)
- How zoom lenses maintain focus while changing focal length
- The optical designs behind specialty lenses (tilt-shift, fisheye, etc.)
- Computational photography techniques that can simulate different focal lengths