Originally posted by photoptimist That original formula isn't right. The link provided by @savoche to that spreadsheet is better although the numbers in it need to be changed to work with the Pentax SR system.
Note: checking for hood vignetting by stopping down can determine if a hood is bad but provides no guarantees that it is good. A hood can pass the stop-down test but still cause vignetting under two conditions:
First, a hood could pass the stop-down test but also create up to 1-stop of vignetting when the aperture is wide-open.
Second, a hood could pass the stop-down test but create severe vignetting when the IBIS system has the sensor shifted. The required unvignetted image circle is larger than the 43.3 mm circle of a 36x24 frame. It's a 47.4mm circle to handle the ±1.5 mm of 2-axis shift on top of the 36x24 frame.
while i agree with the second point, the only way to determine the first is to have a before and after test with and without the hood. note that many lenses have light fall off, , not vignetting exactly of up to 2-3 stops in terms of exposure value between middle and edge when wide open and it is almost impossible to detect without making a measurement.
but common sense suggests if you use the sheet, then simply take the maximum length and take it back a few mm. also since the hoods, unless you are making it yourself , are in fixed sizes, you simply pick the next one in sequence that is shorter than the spreadsheet predicts is optimum