Much effort is currently directed at describing the behavioral reactions of marine mammals following exposure to sound with the aim of deriving generalized thresholds and dose-response functions. The perceived loudness of a given sound is a candidate for a common metric for sound exposure. The loudness of a signal relates to various factors, including the stimulus duration and frequency content, and it can be approximated by an appropriate time and frequency weighting of the signal. Auditory frequency weighting is achieved by applying a frequency weighting function (band-pass filter), with a frequency response resembling the shape of an inverted audiogram. Temporal weighting may be achieved by computing the running rms-average (Leq) with a time constant that is comparable to that of the mammalian auditory system. The practical implementation of such weighting functions are presented in the form of Matlab functions. These functions generate output signals that are weighted according to current recommendations for different groups of marine mammals. With these functions, it is possible to derive the weighted peak Leq of a signal, which is likely to be a good proxy for the loudness of the signal. Ultimately, this weighted level is conjectured to be a predictor of behavioral response of marine mammals to the sound.