Depth of Field Calculator
Calculate near and far focus limits, total depth of field, and hyperfocal distance from focal length, aperture, and subject distance.
DOF Calculator
Enter your lens and camera settings to calculate depth of field
Results
How It Works
What is Depth of Field?
Depth of field (DOF) is the distance between the nearest and farthest objects in a scene that appear acceptably sharp in a photograph. It is determined by focal length, aperture, subject distance, and sensor size.
Key Formulas
- Hyperfocal distance:
H = f² / (N × c) + f - Near focus limit:
Dn = s(H − f) / (H + s − 2f) - Far focus limit:
Df = s(H − f) / (H − s)(infinity if s ≥ H) - Total DOF:
Df − Dn
Where f = focal length, N = f-number, c = circle of confusion, s = subject distance, H = hyperfocal distance.
Circle of Confusion (CoC)
The CoC represents the largest blur spot that appears sharp to the human eye. It varies by sensor size because smaller sensors require greater enlargement to produce the same print size:
- Medium Format: 0.043 mm
- Full Frame (35mm): 0.030 mm
- APS-C: 0.019 – 0.020 mm
- Micro Four Thirds: 0.015 mm
Factors Affecting DOF
- Aperture: Wider apertures (lower f-numbers like f/1.4) produce shallower DOF. Narrower apertures (f/11, f/16) produce deeper DOF.
- Focal length: Longer focal lengths compress perspective and produce shallower DOF at the same subject distance.
- Subject distance: Closer subjects have shallower DOF. Moving further away increases DOF.
- Sensor size: Larger sensors produce shallower DOF at equivalent field of view.
Hyperfocal Distance
The hyperfocal distance is the focus distance at which everything from half that distance to infinity appears acceptably sharp. Landscape photographers often use this technique to maximize sharpness throughout the scene.
Practical Tips
- Portraits: Use wide apertures (f/1.4 – f/2.8) with longer focal lengths for pleasing background blur
- Landscapes: Focus at the hyperfocal distance with f/8 – f/11 for maximum sharpness front to back
- Macro: DOF becomes extremely thin at close distances; consider focus stacking
- Diffraction: Apertures beyond f/16 can reduce sharpness due to diffraction, even though DOF increases
Related Utils
Feedback
Help us improve this page by providing feedback, and include your name/email if you want us to reach back. Thank you in advance.
Sending...
Feedback sent. Thank you!
Error occurred!
-
-
-
-
-
-
-
- ABI Encoder / Decoder
- Block Estimator
- Calldata Cost
- CREATE2 Address
- ENS Availability
- ENS Cost Estimator
- ENS Lookup
- ENS Namehash
- ENS Record Viewer
- ENS Subname Explorer
- ERC-20 Unit Converter
- Gas Estimator
- HD Wallet Derivation
- Merkle Tree Visualizer
- 4-Byte Selector Lookup
- Solidity Storage Layout
- Transaction Decoder
- Vanity Address Estimator
- Wallet Address Validator
- Wei/Gwei/Ether Converter
-
-
-
-
-
- API Response
- ASCII Table
- Code Bug Detector
- Code Explanation
- CSS Beautifier
- Env Parser
- GraphQL Query
- Syntax Highlight
- HTML Beautifier
- JS Beautifier
- JSON Formatter
- JSONPath
- JWT Decoder
- JS keyCodes
- API Lorem Ipsum
- RegExp
- Regex Library
- Semver Compare
- SQL Beautifier
- TOML Formatter
- Code Unminifier
- XML Beautifier
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Amortization
- Break-Even
- Compound Interest
- Crypto Profit/Loss
- Debt Payoff
- Discount
- Effective Interest
- Emergency Fund
- Inflation Calculator
- Simple Interest
- Invoice Calculator
- IRR Calculator
- Mortgage
- NPV Calculator
- Portfolio
- Profit Margin
- Rent vs Buy
- Retirement Calc
- ROI Calculator
- Salary vs Hourly
- Savings Goal
- Tax Calculator
- VAT
-
-
-
-
-
-
-
-
-
-
-
-
- Equation Solver
- Exponent Calculator
- Factorial Calculator
- Fibonacci Sequence
- Fraction Calculator
- Fraction Simplifier
- GCD Calculator
- GCD/LCM
- Least Common Multiple (LCM) Calculator
- Logarithm Calculator
- Magic Square
- Matrix Calculator
- Number Base Converter
- Pascal's Triangle
- PDE Solver
- Prime Checker
- Prime Factorization
- Roman Numbers
- Scientific Notation
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Broken Link Checker
- Canonical URL Checker
- Core Web Vitals Checker
- Favicon
- Heading Structure
- Keyword Density
- Meta Tags
- Mobile-Friendly Test
- Open Graph Tags
- Page Load Time Analyzer
- Redirect Checker
- robots.txt
- Schema Markup
- SEO Optimized Checklist
- XML Sitemap
- Time on Page Tracker
- Page Title & Desc.
- Twitter Card Generator
-
-
-
-
-
-
- Acceleration
- Substance Amount
- Angle
- Area
- Astronomical
- Base Converter
- Capacitance
- Electric Charge
- Data Transfer
- Data Storage
- Density
- Energy Converter
- Force Converter
- Frequency Converter
- Fuel Economy
- Illuminance
- Inductance
- Length / Distance
- Power
- Pressure
- Electrical Resistance
- Time
- Speed
- Temperature
- Viscosity
- Volume
- Weight
-
-
-
-
-