At the same subject size in the frame, depth of field is set by the F-NUMBER and the format — the focal length very nearly cancels out.
Depth of field does fall off hard with focal length at a fixed distance. But change lens and then walk until the subject fills the frame the same way, and almost all of that difference cancels: the magnification term in the depth-of-field expression replaces the focal length term. A head-and-shoulders shot at f/2.8 on full frame gives 293 mm of depth of field at 24 mm from a metre away, and 287 mm at 200 mm from eight and a half metres — an eightfold change of lens for a two per cent change in depth of field. It is tempting to say the aperture DIAMETER is doing the work, and that is wrong: a 200 mm at f/11.2 has the same 17.9 mm hole as a 50 mm at f/2.8 and gives four times the depth of field. What the diameter governs is the BACKGROUND — the long lens magnifies it, so the out-of-focus area is far more blurred even though the sharp slab is the same thickness, and that is what people are actually looking at. The diameter does become the invariant when you compare FORMATS: matching the look on a smaller sensor needs the f-number divided by the crop factor, and since the focal length divides by it too, the hole comes out the same size.
Very close up, where magnification is high and the approximation that lets the focal length cancel breaks down, and on lenses that breathe — most internally focusing zooms lose real focal length as they focus close, so a 70–200 can behave like a 140 at its minimum distance. It also says nothing about how the blur LOOKS, which is the thing people usually care about.
Estimate with the rule, then check it against the calculator that models it properly.
Open Depth of Field →