The application has been updated since your last visit. Go to the changelog to learn more.
Hover over any element with orange
border to see help.

Bokeh simulator & depth of field calculator

Distance units:  
Model: Background: Orientation:
(equiv. {{f*sensor.multiplier | number:0}}mm)  
Sensor size: crop: {{sensors[format].multiplier | number:2}}x
The model cannot be placed further than the background.
Distance: cm = {{y0/1000|infiniteNumber:2:units}} ft = {{y0/914.4|infiniteNumber:2}}yd
Background: cm = {{y/1000|infiniteNumber:2:units}} ft = {{y/914.4|infiniteNumber:2}}yd
Saved settings
Focal length Aperture Sensor Distance Background Bokeh Remove
{{params.f}}mm f/{{params.a|number:1}} {{params.format}} {{params.y0/1000|infiniteNumber:2:units}} {{params.y/1000|infiniteNumber:2:units}} {{fourierBlurTypes[params.fourierBlurType]}}-
No saved settings
Simulation Background blur: {{r | number:3}}mm / {{lines| maxNumber:0:maxLines}} / {{mpix | maxNumber:1:maxMpix}}Mpix Optimal f-number: f/{{optiA | number:1}} ({{optiR | number:3}}mm / {{optiLines | maxNumber:0:maxLines}} / {{optiMpix | maxNumber:1:maxMpix}}Mpix)
Background blur: {{r | number:3}}mm / {{lines | maxNumber:0:maxLines}}  / {{mpix | maxNumber:1:maxMpix}}Mpix Diffraction: {{airy | number:3}}mm / {{diffractionLines | maxNumber:0:maxLines}}  / {{diffractionMpix | maxNumber:1:maxMpix}}Mpix
Maximum background scale exceeded.
Error occured during loading backgorund images .
Processing in progress...
Error occured during processing.
Try again.
Author of models drawings: Denis Cristo
Source of background photo: {{background.source}}
author: {{}}, licence: public domain CC BY-SA 3.0 CC BY-SA 2.0 CC BY 2.0 CC BY-NC 2.0
Depth of field {{nearDOF/1000 | infiniteNumber:2:units}} ~ {{farDOF/1000 | infiniteNumber:2:units}} ({{(farDOF-nearDOF) | smartNumber:units}})
Circle of confusion: {{sensor.c | number:4}}mm
Max. f-number:
f/{{maxA | number:1}}
In front of subject:
{{frontDOF | smartNumber:units}} ({{frontDOF/(frontDOF+backDOF)*100 | infiniteNumber:1}}%)
Behind subject:
{{backDOF | smartNumber:units}} ({{backDOF/(frontDOF+backDOF)*100 | infiniteNumber:1}}%)
Hyperfocal distance:
{{hyperfocal/1000 | infiniteNumber:2:units}} (>{{hyperfocal/2000 | infiniteNumber:2:units}})

  {{scale}} 50m  ~ ~ ~ 100m 25m  ~ ~ ~ ~ 50m 150ft  ~ ~ ~ 300ft 75ft  ~ ~ ~ ~ 150ft  ∞
Bokeh simulator and depth of field calculator

This application calculates the depth of field in a photo, visualizes it and simulates the background blur (bokeh) based on parameters like: lens focal length, aperture, sensor size and distance of the object and the background from the camera. Changes in parameters are immediately visible in the simulation. This allows to easily observe how they affect the final effect.

Activating the help mode allows to obtain additional description of the interface elements. By clicking on one of the buttons with question mark () you can read more detailed information about each panel of the interface.

All calculations are performed with assumption that the lens is a single, thin lens. Such approximation can cause slight differences from the actual values observed in reality.

The application is written in JavaScript. It uses jQuery and AngularJS libraries. It does not communicate with the server, so an offline version is avaliable. However, I encourage you to visit this page instead, because there will be probably some bugfixes and updates in the future.

The simulator makes use of modern web technologies, such as HTML5 and CSS3 and may not work correctly in older browsers. It has been tested to work with Chrome 20.0, Firefox 4.0, Opera 12.0, Safari 6.0, Internet Explorer 9 and newer.

You can mail me at: michal_bemowski(AT)wp(DOT)pl or contact me on Facebook: Any feedback, bug reports and opinions are welcome.

Michael Bemowski is the author and owner of all copyrights except models drawings and background photos, which are published under Creative Commons licence or in public domain. Copying and distributing this application in different way than linking to this page is FORBIDDEN!

  • Completly new advanced bokeh simulation feature. It allows to simulate different types of real-world background lens blur: from soft disks, through polygonal diaphragms to rings from a catadioptric lens.
  • Added option that allows to lock the distance between the model and the background - it simulates the photographer movement with constant position of the model.
  • Facebook page for the application is now available: Like it and subscribe to get notified instantly about new features in the future!
  • Changed model positiong algorithm when background scaling is enabled - it no longer moves when focal length is changed.
  • Displaying opitmal and maximum f-number when diffraction effects are enabled.
  • Cookies warning fixes: it is not shown and the page does not hang if the cookies are blocked.
  • New feature for generating links to the current parameters.
  • Added saved settings list sort feature.
  • Displaying the beginning of the DOF at the hyperfocal distance.
  • Ability to choose in which units the distances are shown: metric (meters, centimeters) or imperial (feet, inches, yards).
  • Ability to change slider value with mouse wheel.
  • I introduced the "Donate" button that allows you to send me some amout of money if you like the application.
  • Displaying number of megapixels corresponding to the calculated blur.
  • Fixes in calculation and displaying of depth of field values for distances close to the hyperfocal distance.
  • Limited scale on the DOF preview in mobile version in order to be more readable on small screens.
  • Some optimalizations to speed up the application, especially in mobile mode.
  • Introduced mobile version, which allows to comfortably use the application on smaller screens.
  • Added the ability to move the model and tree silhouettes in order to change their distances in the configuration.
  • New option allowing to choose other, than the traditionally adopted in photography, circle of confusion size.
  • Added option allowing to inlcude diffraction when calculating image blur.
  • Introduced new guide, which presents all features of the application and replaces existing descriptions of the panels.
  • Because it turned out, that web browsers cannot poperly save the webpage on disk I have provided downloadable version in a zip file.
  • Added several new sensor sizes an ability to choose them with size preview.
  • It is now possible to enter triple the focal length avaliable on the slider for each sensor size.
  • Fixed typo in sensor sizes: 35mm DX -> FX.
  • Added 1m scale intervals in the DOF panel.
  • Moved to new domain, added English translation.
  • More sensor sizes to choose from: medium format, DSLRs and compact cameras.
  • Ability to change slider value by clicking on its track.
  • Support for Internet Explorer 9 and higher.
  • Added top menu and date of last update.
  • Added fullscreen mode button.
  • Moved description from bottom to dialogs avaliable from top menu.
  • 8 new background images with much bigger resolution.
  • Ability to choose models and backgrounds from thumbnails view.
  • Saving all settings and restoring them at the next visit to the page. Added reset button to revert them to default values.
  • Changed method of positioning the model relative to the background in order to be more realistic (in previous version the background moved when focal length changed).
  • Better fitting the content to the window width.
  • Bugfixes, layout adjustments etc.
  • First version of the application.
Building Tree Mountains* Cathedral
Church City* Park* Paris*
*Backgrounds marked with asterix are better suited for working with lock frame option, because of slightly different way of positioning the model.
Blonde 1 Redhead Brunette Blonde 2
Dark-haired 1 Brunet Dark-haired 2 Dark-haired 3

Advanced bokeh simulation does not work in your browser.

Please update it or use another one. Minimum supported browsers versions:

Chrome 20.0

Firefox 4.0

Opera 12.0

Safari 6.0

Internet Explorer 10

Excellent 5 blades diaphragm
Good 6 blades diaphragm
Neutral 7 blades diaphragm
Bad 8 blades diaphragm
Catadioptric lens 9 blades diaphragm

The offline version allows to use the simulator without an internet connection. It is enclosed in a ZIP archive and can be run on any operating system. In order to reduce the size, it contains only four backgrounds and four models.

After downloading, you can simply decompress it anywhere on your hard drive and open the index.html file located in the root directory.

WARNING! The offline version works 100% correctly only in Mozilla Firefox. Other browsers may have problems when opening it directly from a hard drive, althoug it works correctly on a server.

Offline version (45MB)