Here's the Reef Chemistry Calculator to help you figure out how much Mg to add:
http://home.comcast.net/~jdieck1/chem_calc3.html
Make sure you use the link to the Tank Volume Calculator to get things right. Take inside measurements of your tank:
http://home.comcast.net/~jdieck1/volcalc.html