MLU is calculated by dividing the total number of morphemes (the smallest meaningful units of language) by the total number of utterances (complete expressions or sentences) in a given speech or written sample.