Bob McClure has written a very useful, interactive program for computing magnitude. It includes the three most common magnitude types, surface wave (MS), body wave (mb) and local Richter magntiude (ML).
Just download and unzip the file MagCalc.zip to a directory on your PC.
The directory will contain these files:
For some added background information on these magnitude calculations, including FORTRAN/DOS programs for computing them, please refer to these pages: MS, mb and ML