This number can vary from $0-$600,000 depending on financial aid, scholarships, loans, and parental support. It also depends on the cost of tuition (which schools you choose to attend). There isn't one great answer. The cheapest path is to start by taking community college courses in high school. Then complete a two year degree in community college as soon as possible. Complete your last two years for a bachelors at the cheapest school you can find, while maintaining good grades and GPA. Take the MCAT exam (by as cheap a process as possible). Score well on the MCAT. Finally apply and attend the cheapest Medical school you can find. This process might take you all over the country but it will be as cost effective as possible. You have to do a lot of research on the cost of the schools you want to attend and determine how you will pay for them.
In my personal opinion. The cost is very important, but you want to find the environment that is best for you. That place won't always be the cheapest option.
Another unfortunate consequence of debt is limiting the student's choices after graduation. If a student has a passion for pediatrics, but crippling debt, they may be forced to apply to residencies with higher future earning potential.
A typical experience would be to complete residency and become an employee of a group. You aren't able to pay down your debt much because you are saving to become a partner. You buy into the group and then start making partnership money. That's when you are able to really tackle that debt.
But typically you are looking at 10-15 years to pay back your student debt.
On a side note, watch this video which compares a UPS driver to a physician. It makes a lot of assumptions about debt and saving/investment, but concludes that the average primary care physician doesn't become financially better off than a driver until age 53.
If you pay for medical school yourself, you are looking at $200,000+ of student loan debt.
Now money wise that is not a straightforward answer either. It depends on how expensive your undergraduate and medical school are and what type of scholarships you get. It is not uncommon for people to graduate with 200-300 k in student loans.