Doctor vs Software Engineer: Lifetime Earnings Comparison


If you’re like me, for most of your life you probably thought you’d be a doctor. But what if you realized you didn’t want to. It’s a difficult decision to make, even if it’s the right one.

In this post, I’ll show you how another path, becoming a software engineer, can be a much better choice. Even financially.

Software engineers can earn significantly more than physicians. They earn these high salaries much earlier in life and do not have medical school debt.  Because of this, over time software engineers can have a significantly higher net worth. 

Why Compare Doctors and Engineers?

First, these are two of the classic “successful” professions. Doctor, engineer (and of course, lawyer). While the reality is that you can be successful in a vast number of other professions, these are the ones that you hear about from your parents when they tell you what they think you should do with your life.

Secondly, I love engineering. For the longest time I couldn’t decide if I should go to medical school or become a software engineer. Something about thinking logically through complex problems and coming up with solutions resonated with me. It’s likely to be something you’re considering, too.

Oh, and the third reason: One of my friends did become a software engineer, and his company was recently acquired, making him a millionaire way sooner than any doctor, including me.

Do Doctors Earn More Than Engineers?

Maybe you’re worried that becoming an engineer means you won’t get that one thing all doctors seem to have: money. It’s not something they teach you about in medical school, but most pre-med students see becoming a “rich doctor” as the prize at the end of the race.

The data’s out there. Look up the best paying jobs and you’ll see medicine right there at the top. Not software engineers. But if doctors are so wealthy, then why did half the attending physicians on my clinical rotations tell me they wish they worked on wall street instead? Why aren’t doctors all rich? 

And wait…do doctors really make less money than teachers?

Now, I checked the math behind that last article, the one that says doctors make less than teachers. It’s a bit misleading. Of course doctors make more money than teachers. The article draws its conclusion by comparing the dollars per hour earned by each profession which gives a huge disadvantage for physicians. I don’t like looking at it in that way. Instead I like to compare professions by comparing net worth.

So let’s run the numbers again, this time looking at software engineers and physicians by net worth.

Doctor vs Engineer Lifetime Earnings 

I created this spreadsheet to show you the difference in lifetime earnings. Assuming the engineer goes to a four year undergraduate program and the doctor takes the traditional path. Also assuming average stock market gains of 8% per year.  Here it is separated by major milestones.

We start in year 0, after both the doctor and the engineer graduated from undergraduate school. Both went to the same college and graduated with the same $29,200 in debt, the average debt for undergrad students in the US.

In year 4, the doctor finishes medical school, but also gained another $188,758 in debt and added some interest to her undergraduate loans. Meanwhile, the engineer gets a job straight out of college, making $77,718 after tax and lived like a student (30k post tax) for one year. With her debt paid off, she has been living comfortably on 50k/year post tax and is now able to invest the remainder.

While the doctor is in residency, she makes ~$42k/year and sees some pay raise year over year, but is only living on $30k/year post tax. By doing this, she can pay off ~12k/yr of student loans. Interestingly, despite this her debt still grows. During this time, our engineer keeps working and investing, growing their wealth.

At age 30, the doctor finally graduates residency and becomes an attending! She starts her job in primary care making $154,691 after tax and finally increases her spending to $100k/year. In real life, the engineer probably got a raise by now, but not in this simulation. She just keeps doing the same thing and becomes a millionaire at age 41. Well before the doctor whose net worth at the same time is ~$460k.

Who Is Richer? The Doctor or the Engineer?

Despite going into the very lucrative field of medicine and becoming another “rich doctor,” the the doctor’s wealth was outpaced by the engineer.

Now, there are a few things I want you to notice about this simulation:

1: The doctor has negative net worth until she’s 34 years old. That means she can’t grow her money in the market until she’s 34. Meanwhile, the engineer starts investing at age 23. Time in the market has a huge impact.

2: The engineer continues spending 50k/yr while the doctor increases their spending to 100k/yr once they become an attending. This is extremely common amongst physicians. While I don’t have data on the spending habits of engineers, they are likely to see pay raises later in their careers and could easily continue to invest 27k per year while increasing their lifestyle spending. This would not greatly change the results.

3: There is no denying that doctors make a lot of money. The key is that they start doing so much later in life.

Should you be a doctor or an engineer?

If doctors don’t have positive net worth until they’re 34, are you screwed if you become a doctor? Does this mean you should be an engineer?

ABSOLUTELY NOT.

I used to think this when I was weighing the decision to be a physician, and I hope I’ve shown you just how wrong it is.

The decision is yours. You can be an engineer, like I showed you above, or you can pick any number of other career paths and be perfectly fine financially. Want to see for yourself? Download the complete spreadsheet here and plug in your own numbers.

Yes, you will make money if you decide to be a doctor, but not until later. And choosing to be a doctor means committing to 7+ years of training. In addition, deciding not to be a doctor will not ruin you financially. In fact, you may actually be better off. Especially if there were other reasons you decided not to do it.

The last thing I want to leave you with is this. If you decide not to be a doctor, it’s ok.

In fact, for most of you, it’s better than ok. It just means you wanted to do something else, like being a software engineer. So go ahead, make the right decision for you. I hope this information helped.

What do you think? Would you rather be a doctor or an engineer? Let me know in the comments.

If you enjoy this content, don’t forget to subscribe to the newsletter to stay up to date with the latest from The Average Doctor. 

A Quick Note On The Spreadsheet

  • All incomes are after tax using this tool https://smartasset.com/taxes/paycheck-calculator
  • Resident and physician incomes are based on the medscape data below.
  • Engineering data is all over the place and changes a lot with geography.  Salary data was obtained from the link below.
    • If you’re more interested in actual software engineer salaries, I highly recommend [this video]
  • Of course not everyone will live off 50k/year post tax, numbers will change depending on your savings rate.
  • Market returns are assumed at 8% per year. Actual numbers may differ.
  • Finally, results will vary significantly if you’re a specialist vs a PCP. An engineer or an artist. etc.

Sources

8 thoughts on “Doctor vs Software Engineer: Lifetime Earnings Comparison

  1. Thank you for this upload. I am currently trying to make the decision between the two currently and found this article helpful; however, I find myself struggling to see myself readjust between the two as I have found myself to be leaning towards medical all this time. Additionally, as I am currently living in Canada I am forced to face the harsh reality that acceptance into medical-oriented courses is extremely difficult. Is there any sort of additional advice that you, the publisher, or any other viewer of this comment could provide to try and help me make a decision? For reference sake, I have roughly a 93% average and take all university-level courses.

    Thanks again for the article and good luck to all those who are in a similar situation.

    1. I am struggling with this confusion right I’m so doubtable finally I found somebody like me it’s really rough to go threw it and people can’t feel how it is ..
      Your text was really helpful

      But am thinking that life is not all about money after all but it’s also happiness
      I have a question for, when do you feel happy is it when you help a kid or a mother with when you save their lives or when you code for a company ?
      I have many other question but I wrote this one because you were talking just about the financial thing
      And thank you for this you saved my life

  2. Great write up, also great site! Can I get the link to the chart? Tech challenged and can’t seem to find the hyperlink…

  3. Well you left a consideration out. Many engineers are used up, a decade out of school, when their training goes stale. Then finding employment is dicy. A doctor will ALWAYS have a job. And that’s why they spend like it. Hilarious in covid times, when many doctors found their income down by 15+%. It was quite a shock to them.

  4. This analysis was silly. PCP are the lowest paid doctors and still make way more than the analysis states on average, even the residency salary was very low. This is clearly an extremely biased analysis. The average doctor will out earn the average engineer just a few years after becoming an attending.

    1. 16 Year salary history below.

      Since folks like to perform career financial comparison, I figured I would provide my engineering salary over the last 16 years.

      Engineering only requires bachelors degree. First year of engineering students take Calculus, Physics with Calculus, Chemistry and English Composition. This course load is pretty intense.

      Below is my work history from engineering 1-5, years, salary and work location. My jobs is an 8 to 5 pm, not very stressful unless working on proposal.

      2005 52k/yr Northeast
      2006 54k/yr Northeast
      2007 56k/yr Northeast
      2008 60k/yr Midwest
      2009 65k/yr Midwest
      2010 80k/yr Silicon Valley
      2011 90k/yr Silicon Valley
      2012 98k/yr Silicon Valley
      2013 105k/yr Northeast
      2014 115k/yr Northeast
      2015 124k/yr Northeast
      2016 132k/yr Northeast
      2017 150k/yr Southeast
      2018 160k/yr Southeast
      2019 180k/yr Southeast
      2020 200k/yr Southeast
      2021 230k/yr Southeast

      Over the years I’ve learned the small companies payless and engineers have more responsibilities. With the exception of start ups in Silicon Valley which normally pay 20 to 30% more due to the cost of living. Normally the additional pay does not compensate the cost of living delta. I would say my salary is average and definitely below the salaries that can be achieved in Silicon Valley. Also, the market is over saturated with mechanical engineers. Therefore their salaries are lower and you’ll find more mechanical engineers working in other professions outside of engineering.

      I hope this information helps as people are evaluating future career opportunities. Cheers.

  5. For anyone wondering about REAL software engineer salaries, go to www.levels.fyi . There is something I would like to point out about this analysis: Both, the data on SWEs and MDs salaries are too low. Expect 200k as a family medicine doc, and expect 500k as any surgeon, if you match. Now, onto software, just go to the page I mentioned, it is the one we use in industry to negotiate salaries when we change jobs. I work at Netflix, I am making 520k. I do not have a PhD, but I do consider myself “elite” in my area, which is optimization. I graduated from my bachelor’s degree 5 years ago, my first job I had a 130k salary a year (not counting bonus). I have a year at Netflix, entered as a senior engineer. On top of this, I know of co-workers on my same level that are making 650k. Because I didn’t know of levels.fyi or Blind, I didnt negociate salary when I entered, and I am being payed below average. Another thing to have in mind, since someone mentioned that jobs are not stable; I have recruiters contacting me daily. Recruiters from Meta, SnapChat, Twitter, Block, CashApp, SpaceX, Microsoft, Adobe, etc. And I am not even like someone who has 10 years of experience.

    So, if it is money you want, software is better. That being said, the more prestige a company has, the more it will pay, but also the harder it will be to get in there. The Algorithm rounds for Netflix were brutal. Brutal.

Leave a Reply

Your email address will not be published. Required fields are marked *

Recent Posts