The usual test is to run as hard as you can for three minutes, jog for a couple of mins, repeat two more times.
You can do this on a treadmill (which avoids hazards such as kerbs, padestrians and dogs) on an incline, or on a hill.
You should get your max HR in the last hard repeat.
Your MHR could be anything - by the formula mine should be 169, but even a moderate run sends mine to well over 170, often over 180 and on a really steep hill over 190. On the test mine was 198.