M is the roman numeral for 1,000. So MM is meant as 1,000 x 1,000, which equals 1,000,000 (one million). OP should have used capital letters, as mm does indeed denote millimeters. Better yet, just use the more common M symbol to mean "million."
There isn't a way to write one million in Roman numerals on a standard keyboard (it would be M with a bar over it, or "M" 1,000 times). Instead the shortcut "thousand thousand" (MM) gets used.