Richter's original magnitude scale (ML) was extended to observations of earthquakes of any distance and of focal depths ranging between 0 and 700 km. Because earthquakes excite both body waves, which travel into and through the Earth, and surface waves, which are constrained to follow the natural waveguide of the Earth's uppermost layers, two magnitude scales evolved - the MB and MS scales.
The standard body-wave magnitude formula is
MB = log10(A/T) + Q(D,h) ,
where A is the amplitude of ground motion (in microns); T is the corresponding period (in seconds); and Q(D,h) is a correction factor that is a function of distance, D (degrees), between epicenter and station and focal depth, h (in kilometers), of the earthquake. The standard surface-wave formula is
MS = log10 (A/T) + 1.66 log10 (D) + 3.30 .
There are many variations of these formulas that take into account effects of specific geographic regions so that the final computed magnitude is reasonably consistent with Richter's original definition of ML. Negative magnitude values are permissible.