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 and depth of field calculator

Configuration
Distance units:  
Appearance
Model: Background: Orientation:
Lens      
f=mm
(equiv. {{f*sensor.multiplier | number:0}}mm)  
 f/
Sensor size: crop: {{sensors[format].multiplier | number:2}}x
The model cannot be placed further than the background.
Position
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
Framing
Saved settings
Focal length Aperture Sensor Distance Background Remove
{{params.f}}mm f/{{params.a|number:1}} {{params.format}} {{params.y0/1000|infiniteNumber:2:units}} {{params.y/1000|infiniteNumber:2:units}}
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
You exceeded the maximum background scale.
Loading...
{{loadCount/4|number:0}}%
Error occured during loading backgorund images
Source of models drawings: http://www.zcool.com.cn/gfx/ZMjM2NDky.html
Source of background photo: {{background.source}}
author: {{background.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}}m (>{{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. In order to reduce size, it contains only four backgrounds and four models. After downloading, you can simply decompress it and open index.html file. 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 in English at: michal_bemowski(AT)wp(DOT)pl 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!

24.08.2014
  • 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.
11.08.2014
  • 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.
27.05.2014
  • 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.
17.05.2014
  • 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.
27.04.2014
  • 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.
09.04.2014
  • 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.
07.04.2014
  • Fixed typo in sensor sizes: 35mm DX -> FX.
  • Added 1m scale intervals in the DOF panel.
06.04.2014
  • 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.
07.03.2014
  • 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
{{sensor.key}}