PINHOLE MATH
This section is not necessary AT ALL to do pinhole photography. It is written for people, like myself, who have to know what is going on and why. If math bothers you, go back to the tables and you will do fine. The ART is more important!
When talking about measurements for a pinhole it is easier to think in metric, as in millimeters. You already do this if you own a 35 mm camera in that your lens' focal length is sized in millimeters. A normal lens being around 5055 mm and a telephoto being anything greater than say 100 mm A wide angle lens is from 1835 mm and so on.
In deciding on the ideal pinhole you can go from a fixed focal length and then determine the size of the ideal pinhole or you can go from the size of the pinhole and go for the ideal focal length.
There are many factors influencing the size of the pinhole and authors will disagree as to the intensity of the effects of any particular factor. The calculations below are based in empirical observations by the author of this web site. [ie. done with actual pinholes, film and such] One factor is the color of the light. Blue light has the highest resolution and red the lowest. This affects the size of the hole. For practical purposes, we compromise on green light (560nm) to be equivalent to daylight.
Metric (mm) formula for green light (560 nm): see TABLE OF PINHOLE SIZE TO FOCAL LENGTH
if we have a pinhole of 0.4mm then
120mm = 0.4mm X 0.4mm X 750
or an ideal focal length of 120mm is found.
Constants for other types and colors of light:
Daylight (560nm)  750 
Blue (450nm)  934 
Green (550nm)  763 
Red (650nm) [also used for tungsten]  647 
Infrared (750nm)  561 
Now the other way round: see TABLE OF FOCAL LENGTH TO PINHOLE (mm)
from the previous example, we will choose a focal length of 120mm
= sqrt( 120/750)
= sqrt(0.16)
= 0.4
Just for fun let us assume you are going to use your living room for a giant pinhole and it is 15 feet from the window to the wall. How big a pinhole would we need?
= squareroot(4572/750)
= 2.45 mm or about 1/10 of an inch
Remember: F# = focal length / diameter of lens opening.
This can get confusing in terms of using a light meter, so to help out here is a normal progression of F numbers past what we are used to seeing:
Since pinhole fnumbers are usually not even as in the above table, here is a formula that can help:
Bright Sunny day exposure in seconds = ((f# x f#)/ASA) x 0.0039OR = (f#/16)^2 / ASA (gives the same answer)
If you have a hand held light meter, set it to the proper ASA and read the value at F16, then use this formula to find the exposure:
Seconds = ((f# x f#)/ASA) x (f16 exp) x 0.39 OR = (f#/16)^2 x (f16 exp)
DON'T FORGET RECIPROCITY FAILURE! see the data sheet that came with your film
REMEMBER each jump in F# is a halving of the amount of light available
One of the neatest things about pinhole photography is the time dilation effect.
Over a onehour exposure, people and cars will disappear!
Why do larger formats look sharper?
As the size of the negative gets bigger, so does the size of the ideal pinhole for the same angle of view.
Let's calculate the total lines of resolution for each format, from 35 mm to 8x10, lines of resolution is the size of the pinhole x five for daylight. You can get a bit higher with a blue filter, but this will do for purposes of this discussion.
Format

Focal Length

Ideal Pinhole

Neg Diagonal

Lines/negative

fstop

35mm

22

0.171

43

1257

128

6x7

42

0.236

90

1907

177

4x5

74

0.314

154

2452

235

5x7

100

0.365

210

2877

273

8x10

150

0.447

308

3445

335

The change in negative diagonal from 35 mm to 8x10 is 7 fold, but the resolution is only 2.7 fold higher, so clearly there is a diminishing return for going to a larger size. Basically, use the largest size you are willing to carry. [and can afford the film for!] ALSO, remember the fstop gets higher with the larger formats, so you run out of light/time at some point.
Personally, I find the 4x5 format to be near ideal. There are a large number of films available [more varied than 35 mm actually], access to roll film backs, etc. The negative is just large enough to contact print and still be visible. Enlargers are in the painful, but still possible range [8x10 enlargers are in the obscene range!]. Lastly, using a pinhole camera is already a SLOWER process, so carrying around a 4x5, though slower to use than 35, is not that much different for pinholes. [8x10 cameras need an assistant or pack animal to carry around]