Grains and extracts have an "extract potential," which is the resulting gravity if you added one pound of the extract (or specialty grain) in question to a gallon of water or mashed one pound of the base grain into a gallon of water at 100% efficiency. You take that extract potential number and do a little algebra.
TL