
Bokeh lights in San Diego’s Gaslamp Quarter, taken with a Sony DSC-R1 at 69.8mm with f/4.8 and focused to the near limit of about 50cm.
Basics
The disks in Figure 1 are essentially the images of point sources located a long distance away and are used here to illustrate the bokeh effect. In a “regular” photograph, each point in the background of the scene is convolved with the shape of the bokeh disk and superposed with the disks from all other background points, just like the overlapping disks in Figure 1. The result is a more or less blurred background which nicely isolates an in-focus foreground. The larger the bokeh disk, the more pronounced the blur effect and foreground isolation will be. For lots of great examples, check out flickr’s Bokeh - Smooth & Silky picture pool.
Calculating the expected size of bokeh disks – and thus the strength of the bokeh effect – is not at all that hard. The only formula from optics that we need is the thin lens formula
$$\frac{1}{f} = \frac{1}{a} + \frac{1}{b} \tag{1}$$
where $f$ is the focal length of the lens, $a$ is the object distance, and $b$ is the image distance. The rest is just basic trigonometry. We will assume a thin lens throughout to make our life easier. However, the results then will only hold for $a \gg f$, since otherwise the geometry of the lens becomes relevant. Therefore, macro photography is not covered by this post.
The above quantities and a few more are shown in Figure 2. Here, $\Delta b$ is the difference in image distance between an object at distance $a$ and one at infinity, as can be determined using (1) – for the object at infinity, $b = f$. Furthermore, $A$ is the (absolute) aperture size of the lens, as related to its f-number $N_f$ by $A = f / N_f$, $w$ is the size of the sensor, and $d$ is the diameter of the bokeh disk on the sensor.

Figure 2: Basic quantities for bokeh calculations:
$a$ - object distance
$b$ - image (sensor) distance
$f$ - focal length
$A$ - lens aperture
$w$ -sensor size
$d$ - size of bokeh disk
