Use this handy online calculator to convert from Brix to Specific Gravity of unfermented wort when measuring with a refractometer.
To calculate the specific gravity of fermented wort, you should use this calculator which adjusts the measurement for the presence of alcohol.