Below are various documents containing formulae used. Unless otherwise stated all links are to PDF files
Basically all of these are interesting documents in their own right quite apart from the fact that they contain formulae for conversions.
Magnitude Scales And Quantification Of Earthquakes.
If you look at none of the others you should look at this one as it is the most relevant in terms of explanations, hence I have placed it at the top.
Probabilistic Seismic Hazard Assessment for Vanuatu
The conversion data is on page 17, section 3.3.
Probabilistic Seismic Hazard Assessment For The Democratic Republic Of Congo And Surrounding Areas
The calculations are on the 4th page of the document, numbered page 332.
Some definitions from Wikipedia
Earthquake Magnitude Scales by James P. McCalpin (PDF)
Magnitude, Energy and Frequency of Occurrence A description of the Richter scale.
Relation between Seismic Moment M0 and Surface Wave Magnitude Ms A technical document from the University Of Tehran. (PDF 2007)