I seldom use exactly the same lens setup twice, so all my scale bars are different. And despite my fondness for math, I avoid calculations whenever possible because it's too easy to mess them up.
Turns out, it's pretty easy to make custom scale bars with only very simple calculations, often none at all. Just make a reference image by shooting a scale using the same optical setup as for your real subject. Use the selection tool in your photo editor to measure how many pixels there are in some convenient scale unit of the reference, then draw a scale bar that many pixels long in your subject image.
If your photo editor supports layers (most do), then it's particularly convenient to combine the reference scale and the subject into a single multi-layer image. That way the reference scale sticks right with the subject as you crop, resize, etc., making it easy to defer the final selection of scale bar thickness and length until you're ready to do final composition.
Here's an example:
- Shoot the subject
- Remove the subject, shoot a scale with the same optics
- Overlay the scale and the subject
- Select and fill a scale bar
- Add text giving the physical length of the bar
- Done!


Most of the jpeg's that I post are saved from a Photoshop file that is layered like this, including a reference scale. It takes some extra space on my disk, but it gives me one less thing to think about. That seems like a good tradeoff.

--Rik
Edit: changed title to reflect topic shift.