For AWG (AMerican Wire Gauge) only, see
http://www.powerstream.com/Wire_Size.htm
The formula is
d = 0.005" * 92^((36-AWG)/39)
This is based on #36 wire being 0.005" and #0000 (treat as -3) being 0.46". There are 39 steps in a 92:1 ratio.
Note that 20 steps 92^(20/29) = 10.164 (~10), and
6 steps, 92^(6/39) = 2.005 (~2).
These are useful to do in your head, but are not an exact fit, and WRONG formulas also appear on the web based on powers of 2 or 10.
For efficient computation, this can be reduced to
d = b*e^(-an)
where n = AWG number, 00 = -1, 000 = -2, etc
b = 0.46 inch * 92^(-1/13) (about 0.32486")
a = (ln92)/39 (about 0.11594)
in mm, multiply b by 25.4 mm/inch