The determination of the amount of immunoglobulin M in a sample. The trait is EFO_0020466 (immunoglobulin M measurement).