Explore our collection of 150+ developer tools, PDF editors, and image converters. Everything runs locally in your browser.
Ubify Media & Design Operations
UI/UX & DIGITAL MEDIA SPECIALISTS
About This Tool
The Lens Depth of Field & Bokeh Blur Simulator calculates exact near and far focus limits, hyperfocal distance, total depth of field, and background circle-of-confusion bokeh diameter.
### Optical Equations & Sensor Circle of Confusion Depth of field (DoF) measures the acceptable zone of sharpness in front of and behind your subject plane. The tool applies standard geometric optics formulas based on sensor format circle of confusion (CoC): - **Sensor Circle of Confusion (CoC)**: - **Full Frame ($36 \times 24\text{ mm}$)**: $0.030\text{ mm}$ - **APS-C ($1.5\times$ Crop)**: $0.020\text{ mm}$ - **Micro Four Thirds ($2.0\times$ Crop)**: $0.015\text{ mm}$ - **Medium Format ($44 \times 33\text{ mm}$)**: $0.040\text{ mm}$ - **Super 35 Cine**: $0.019\text{ mm}$ - **Hyperfocal Distance ($H$)**: $$H = \frac{f^2}{N \times \text{CoC}} + f$$ - **Near Focus Limit ($D_n$)**: $$D_n = \frac{H \times s}{H + (s - f)}$$ - **Far Focus Limit ($D_f$)**: $$D_f = \frac{H \times s}{H - (s - f)} \quad \text{(if } H > s - f; \text{ otherwise } \infty\text{)}$$ - **Total Depth of Field**: $\text{DoF} = D_f - D_n$. - **Background Bokeh Circle ($C_b$)**: Evaluates out-of-focus blur disk diameter at background distance $s_{bg}$: $$C_b = \frac{|s_{bg} - s|}{s_{bg}} \times \frac{f^2}{N \times (s - f)}$$
### Worked Optical Example Consider a **Full Frame** camera with a **$50\text{ mm}$** lens at **$f/1.8$**, focused on a portrait subject at **$2.5\text{ meters}$** ($2500\text{ mm}$), with a background wall at **$8.0\text{ meters}$** ($8000\text{ mm}$): - **Sensor CoC**: $0.030\text{ mm}$ - **Hyperfocal Distance ($H$)**: $$H = \frac{50^2}{1.8 \times 0.030} + 50 = \frac{2500}{0.054} + 50 \approx 46296 + 50 = 46346\text{ mm} \approx 46.35\text{ m}$$ - **Near Focus Limit ($D_n$)**: $$D_n = \frac{46346 \times 2500}{46346 + (2500 - 50)} = \frac{115865000}{48796} \approx 2374\text{ mm} = 2.37\text{ m}$$ - **Far Focus Limit ($D_f$)**: $$D_f = \frac{46346 \times 2500}{46346 - (2500 - 50)} = \frac{115865000}{43896} \approx 2639\text{ mm} = 2.64\text{ m}$$ - **Total Depth of Field**: $2.64 - 2.37 = 0.27\text{ m}$ ($27\text{ cm}$ zone of critical focus). - **Background Bokeh Diameter**: $C_b \approx 19.5\text{ mm}$ blur disk diameter on the background elements.
### In-Browser Geometric Optics All optical formulas and side-profile ray tracing render dynamically on an HTML5 canvas in your local browser runtime. No shooting coordinates, lens metadata, or production details are sent over the network.
How to Use
- 1
Select your camera sensor format (Full Frame, APS-C, Micro Four Thirds, Medium Format, or Super 35 Cine).
- 2
Enter lens focal length in millimeters (e.g., 50 mm) and aperture f-number (e.g., f/1.8).
- 3
Input subject focus distance and background distance in meters.
- 4
Review near/far focus limits, total depth of field, hyperfocal distance, and the live 2D ray profile.
Frequently Asked Questions
What is hyperfocal distance?
Hyperfocal distance is the focus distance that produces the maximum depth of field, keeping everything sharp from half the hyperfocal distance to infinity.
Why does sensor size change depth of field?
Smaller sensors require greater magnification to view at standard print sizes, necessitating a smaller acceptable circle of confusion (CoC) standard and yielding different depth of field characteristics.
Does this calculator transmit my camera configurations?
No. All ray diagrams and optical mathematics execute 100% locally in your web browser.