Pinhole camera: optimal hole diameter.
Find the optimal pinhole diameter for your camera obscura – calculated with scientific precision for maximum image sharpness.
Includes diffraction analysis, f-number, sharpness index, and adjustment for different wavelengths of light.
- ◆Camera obscura
- ◆Diffraction analysis
- ◆Multiple wavelengths
- ◆Build guide
Pinhole Camera Aperture Calculator
Calculate the optimal pinhole diameter for your camera obscura. The calculator determines the ideal hole size for maximum image sharpness based on distances and the wavelength of light.
m
Distance from the pinhole to the photographed object
cm
Distance from the pinhole to the film plane or sensor
Current wavelength: 550 nm
A pinhole camera (camera obscura) is the simplest form of camera. Instead of a lens, the image is projected onto film or sensor through a tiny hole.
Principle: Light rays from the subject pass through the hole and form an inverted image on the opposite side.
Note: Theoretically infinite depth of field, but resolution is limited by diffraction. The optimal pinhole diameter balances both effects.
Optimal pinhole diameter:
d = √((3.6 × λ × f) ÷ (1 + f/g))
d = Optimal diameter
λ = Wavelength of light
f = Image distance (pinhole to film/sensor)
g = Object distance (pinhole to subject)
The formula minimizes the sum of diffraction blur and geometric blur.
Drilling the hole: Use thin metal (aluminum foil, brass sheet) and drill from both sides to avoid burrs.
Exposure time: Pinhole cameras have very high f-numbers. Expect exposure times from seconds to hours.
Adjusting the image distance: A larger image distance = larger images, but also longer exposure times and a larger optimal pinhole diameter.
Understanding the pinhole camera.
The simplest camera in the world uses just a hole and a dark chamber – and with the right pinhole size it still delivers surprisingly sharp images.
No lens, just a hole.
Two competing effects.
One formula, many variables.
The standard formula for the optimal pinhole diameter balances diffraction and geometry – taking both image and object distance into account.
- d = optimal diameter (mm)
- λ = light wavelength (mm)
- f = image distance (mm)
- g = object distance (mm)
The formula is based on minimizing the circle of confusion by balancing diffraction against geometric blur.
Step by step to your own pinhole camera.
With a few simple materials a box turns into an optical instrument. This guide walks you through materials, drilling, exposure, and sharpness tuning.
What you need.
- Light-tight box or housing
- Thin metal foil (0.1 – 0.2 mm)
- Fine needle or laser
- Black tape
- Magnifying glass for inspection
How the hole takes shape.
- Clamp the foil between wooden blocks
- Drill carefully from both sides
- Remove burrs with fine sandpaper
- Inspect the diameter with a magnifier
Long exposures, not snapshots.
Bigger box, bigger image.
Four key factors.
Four designs at a glance.
From shoebox to room-size camera – every design has its own appeal and strengths.
Classics in cardboard or wood.
Digital with a pinhole.
Entire rooms as a camera.
Easy to experiment.
Colors and optimal diameters.
Different wavelengths require slightly different hole diameters. For panchromatic film or digital sensors, green (550 nm) is the best compromise.
Four pointers for better pinhole images.
Answers to common questions.
Related tools.
These calculators match the current tool and extend your workflow.
Solid photography knowledge.
Calculators give you the number. On the blog and in 1:1 coaching I turn theory into results you can see in your images.