Here's a simple way of calculating the diagonal of a rectangular or square hood, or the diameter of a round hood. It assumes that the front element is only just big enough to avoid vignetting when the lens is wide open (this may not be true, and the assumption may lead to hoods that are slightly larger than they need to be).
f = lens focal length
S = film diagonal
L = diameter of front lens element
H = diameter or diagonal of lens hood
d = distance lens hood protrudes in front of front element, measured from the periphery of a convex front surface, not the vertex.
All measurements should be consistent, eg all in millimetres. It gives hoods that are slightly larger than George's. The formula is based on similar triangles, with the fundamental one being the one formed by the film diagonal and the focal length.
Strictly speaking it only applies for a round hood, but the correct calculation for a rectangular or square hood would require the aperture, and it would be more complicated. The error should not be great, though the error does reduce the size of the hood to slightly below what it would be with a rigorous calculation.
H = S.d/f + L
Best,
Helen