The Friend Who Went Into Tech
Part of Before You Commit. Two people leave college the same June, one into software and one into medicine, and this page follows both of them to sixty-five. Everything underneath it is in the footnotes. What's on the page is the story.
The short version
Almost everyone who goes into medicine wonders, at some hour or other, what the other life would have looked like. This is me actually running it.
On the money, medicine loses. You fall behind at twenty-two and you never catch up, at any age, in any version I could build.1
Both of them end up fine. Neither one is worrying about rent at sixty-five.
Everything in your column assumes you finish, and plenty of people who start premed don't.2 If that turns out to be you, this page is describing somebody else.
The question I actually wanted answered
I was a broke medical student sitting in a restaurant doing math on the menu, working out how to get the most food out of a chicken sandwich for the least money. Across the table was a friend of mine, twenty-four years old, working at Netflix, making over half a million dollars a year. He never thought twice about what he ordered. He was genuinely surprised watching me count.
Maybe half a million was an exaggeration. Maybe he was an outlier. He was definitely a wiz, and I have never been sure how much of that number was cash and how much was a share price that hadn't happened yet.
Around the same time I was playing pickup basketball in the Bay Area with one of the people who built levels.fyi, the database that breaks down what engineers at each company and each level actually get paid. So I had a decent picture of what the other side of that table was worth. I was in the heart of Silicon Valley, looking at software engineers at the top companies, at the height of tech. Obviously my reference point is a little skewed.
What it left me with is a question I suspect most people in medicine get around to eventually, usually somewhere around three in the morning. What would my life have looked like if I hadn't done this?
So I built it and ran it. Two people, same commencement, followed to sixty-five.
Twenty-two
They graduate the same week, in the same rented gowns, from the same institution, and they have essentially the same amount of money, which is none.
He starts in July. He shares an apartment with two people he met on the internet, and the company feeds him, and by October he has stopped noticing that the food is free. His first paycheck arrives and he stares at it for a while. There is a 401(k) with a match that he sets up in about four minutes without really understanding what he has done, which will turn out to be the single most consequential four minutes of this entire story.
He calls his mother in November and tells her he's paying for dinner when he comes home at Thanksgiving. She argues. He wins.
You start in August, and it is the thing you have been working toward since you were fifteen. There is a ceremony where they give you a coat that is deliberately too short, and your family drives up for it, and somebody cries. Then you sit in a financial aid office and a person your parents' age says a number out loud that has a comma in it you were not expecting, and explains that the federal government will lend you two hundred thousand dollars of it and the rest is a separate conversation with a bank that will want to know your credit score.3
You walk out of that office into a building that smells like formaldehyde and you go to work, and honestly you forget about the number for about six weeks, because the work is harder than anything you have ever done and there is no room in your head for anything else.
It compounds while you forget about it, from the day it is disbursed rather than from the day you graduate.4
Both of them are frightened, that first year, in ways they would not admit on the phone to each other. He is frightened that they will work out he doesn't know what he's doing. You are frightened of the same thing, and you are also frightened of the anatomy final.
Him: −$11,000. You: −$87,000.
Twenty-six
He's at his second company now. That sounds like instability and it isn't: the median tenure for people his age is 2.7 years, and everybody he knows has done the same thing.5 The new job came with a title, a raise, and a slightly better view. He is on something like $226,000, though the median across all software developers is $135,980, and both of those numbers are true about entirely different people.67
He goes to four weddings this year. He takes two weeks in Patagonia and comes back with the kind of tan people comment on. He is dating someone his friends like, which he mentions more often than he realizes.
Late in the year, quietly, he has a thought he doesn't say out loud: that the work at this company is more or less the work at the last company, and that being very good at it feels like a different thing from it mattering.
You are in your third and fourth year.
You watch an operation all the way through on a morning that started at four-thirty, and the attending lets you hold something, and something settles in you that never quite unsettles. You write a first-author paper on a rare illness in the hours you were supposed to be sleeping, and for a few months you are one of maybe forty people alive who understands a particular thing about it. You catch your first baby at three in the morning on a labor deck, with a shelf exam on Friday you have not opened a book for. You're the first person in the room to say happy birthday.
You go to two of the four weddings. On the flight to the second one you do the math on what the flight cost, and you are aware of doing it, and you feel about nineteen years old.
At that wedding somebody your own age asks, kindly, when you actually start working. You have been working for four years. You say something polite.
Him: $94,000. You: −$279,000.
Thirty
You match, and you move to a city you did not pick, and the money finally exists. Intern year pays an average of $68,166, rising to $73,301 by your third year, which is real money and is also less per hour than the barista downstairs makes.8
You get your first clean intubation somewhere in here, in the twenty-sixth hour of a shift, on a patient whose name you will remember for a decade. You run your first code and the rhythm comes back under your hands. And you are counting down to your day off while it happens, because the rules guarantee you one day in seven and eighty hours a week averaged over a month, and a hard month is four days off in a month.9 Both of those things are about the same night.
There's a nurse who has been doing this for twenty years who tells you, at four in the morning, that you did that well. You will think about that sentence for longer than is reasonable.
The loan forgiveness everyone told you to build a career around turns out to be worth about half what it was worth to the people who told you.10 You find this out from a spreadsheet, not from a person.
He doesn't own a house. What he does have is eight years of small automatic contributions that nobody has touched, which is doing something quiet and enormous in the background of his life.
He has a bad year at work. A project he gave eighteen months to gets canceled in a meeting he isn't in. He takes it harder than he expects to.
You have a worse year and a better one, sometimes in the same week.
If you were ever going to quit, it's now. Most people who quit, quit now. You don't.
Him: $253,000. You: −$175,000.
That gap, $427,000, is the widest it has been. Over the next five years you take a serious bite out of it, faster than you will ever gain on him again, and it is going to feel like the beginning of the part where you win.
Thirty-five
He gets laid off on a Tuesday, over video, in a call that lasts eleven minutes and includes someone from a department he has never interacted with.
Not because it makes a better story. His industry runs an annual layoff rate of about 1.0% to 1.3%, and yours runs 0.6% to 0.7% and doesn't move in good years or bad.11 Roughly twice the risk, every year, quietly, forever. This year it was him.
He finds something in four months. Those four months are not in any table on this page. He updates a résumé he hasn't looked at since he was twenty-six and discovers the job titles have changed. He gets very good at a certain kind of phone call. He has more time than he has had since college and he cannot enjoy a minute of it.
The new job means a move, so it's New York to San Francisco, having already gone the other way once, and the friends are in three cities now and the group chat does most of the work. He has lived in four apartments and has never repainted one.
Somewhere in that year he asks, out loud, to somebody, what his mark on the world is going to be. People don't ask that when things are going well.
You finish training. You are an attending, or you're a fellow doing one more year because you couldn't leave it alone, and for the first time since you were twenty-two the money arrives properly. It arrives into a life that has already been shaped by not having it. You have six years of habits, and some of them are useful and some take years to put down. You buy something stupid. Everyone does. Mine was a watch that told the same time as my phone and had a little crown on the dial. It was not a smart purchase and I have never once regretted it.
And you are good at this now. Not competent. Good. Somebody pages you because you specifically are the person they want, and you walk in and it's fine, and that is a feeling that took thirteen years to buy.
There is also something on your side you will never notice, because an absence is hard to notice. You have never wondered whether you will have a job. Not as a worry you manage down. As a thought that does not arrive. Doctors do lose posts, contracts end and practices close and departments get restructured by people who have never met you. What does not happen to you is the four months. You could be out on a Friday and working somewhere by the end of the month, and you have known that since you were twenty-four, and it has quietly underwritten every risk you have ever been able to take.
He has known the opposite for just as long, and it has shaped his decisions in ways he would describe as ambition.
He asks you, at a wedding, whether it was worth it. He asks lightly. You give him a light answer. Neither of you is being honest, and you both know it, and then the music starts and neither of you brings it up again.
Him: $500,000. You: $286,000.
The gap was $427,000 at thirty. It is $214,000 now. Those are the best five years you will ever have against him.
Forty-five
You have been an attending for fifteen years. The debt is gone. You earn several times what you earned at thirty. This is exactly the stretch people mean when they say yes, but doctors catch up later.
You have $988,000. He has $1,260,000.
At thirty-five you had it down to $214,000. It is $272,000 now.
It went the wrong way. It went the wrong way during the fifteen years you were earning the most you have ever earned and doing the best work of your life, and it keeps going: $359,000 at fifty-five, $516,000 at sixty-five. You are not catching up. You were catching up for about five years in your thirties and then the arithmetic turned around and started walking away from you again, because his money has been in the market since he was twenty-two and yours hasn't, and there is no amount of attending salary that buys back nine years of compounding.
So I went looking for the year it changes. There isn't one. Not at fifty, not at sixty, not at sixty-five. I ran it several times because I did not believe it. The lines never cross.
Someone you trained with does cross him, at forty-eight, and the only difference between you and them is which field you picked in the third year of medical school.12
Something has started on his side that he did not plan for. Only 12.0% of software developers are fifty-five or older. For civil and mechanical engineers it's 21.0% and 23.2%.13 The postings have started asking for someone cheaper, and the people his age who are still around have mostly moved into managing the people who aren't, which is a different job that he did not train for and is not sure he wants.
You will be able to do this until you are seventy if you want to. Half the people you admire most are past sixty-five and still on the schedule. He is ahead on the ledger. You are ahead on the number of years you are allowed to keep going. Neither of those cancels the other.
They still talk, these two. Less than they meant to. Each of them thinks the other one got the better deal, and each of them is partly right, and neither has ever said it plainly.
Him: $1,260,000. You: $988,000.
Sixty-five
Here is where the two of them land, with everyone else the model followed.1
| 30 | 45 | 65 | |
|---|---|---|---|
| Software engineer, name-brand employer | $328,000 | $1,590,000 | $5,640,000 |
| General surgeon | −$247,000 | $1,210,000 | $5,140,000 |
| Software engineer, urban | $253,000 | $1,260,000 | $4,500,000 |
| Hospitalist, public medical school | −$175,000 | $988,000 | $3,990,000 |
| Hospitalist, private medical school | −$246,000 | $956,000 | $3,900,000 |
| Mechanical or civil engineer | $151,000 | $774,000 | $2,830,000 |
So the answer to whether you should do this for the money is no, and I am not going to soften it. He has four and a half million dollars. You have just under four. Had he gone to one of the big shops he'd have five and a half, and you would be a million and a half behind instead of half a million. And if the market does better over those forty years than I assumed, the gap gets wider rather than narrower, because his money was in it for nine years longer than yours.14
Now look at where the two of them actually are.
Neither one is in trouble. Nobody in this comparison is worrying about rent, or about whether the kids can go to college, or about what the medication costs. The difference between four million and four and a half million at sixty-five is real, and it is not the difference between two kinds of life.
So look at what else is there, on both sides, because you're owed both columns.
He has the decade you spent inside a hospital. Patagonia, the four weddings, the years when his body still did what he asked without negotiating. Somewhere in there he took a real risk, maybe built something, and it either worked or it taught him something worth having. He also has four employers he did not choose to leave, two coasts, eleven minutes on a Tuesday, and a question he asked at thirty-five that I don't know whether he ever answered. Plenty of people answer it.
You have a number you can count. An actual count, of people who are alive, or who were less frightened, or who understood what was happening to them because you sat down and explained it. Most work does not hand you that receipt. Yours does, whether or not you ever asked for it.
It cost your twenties and most of your thirties, and a body that never entirely went back to what it was. There are ten years of other people's photographs that you are not in, and the work that handed you the count is the same work that kept you out of them.
Did he get things you didn't? Yes. His twenties, his thirties, and half a million dollars. Did you get things he didn't? Yes, and you know exactly which ones, and you would not hand them back.
I'm not going to tell you those columns balance, because they aren't the same kind of thing, and turning one into the other is the trick this whole page exists to refuse. What I'll tell you is the part I'm sure of. You'll both be okay. He'll be okay and you'll be okay, and the two of you will be standing in the same neighborhood at sixty-five holding very different decades.
And you'll be walking through mud with weights tied on to you to get there.
Both of those are true. Go in knowing both.
The version where you may not get to choose
All of that assumed both doors were open, and for a lot of the people this site is for, that assumption is the largest number on the page.
His lane wanted a door. An internship, a network, a first job somewhere that pays anything like these figures, and a family that could absorb a gap while he looked. The distribution he lived in measures who got into which building at least as much as it measures anything else, and he was already inside one.
And your lane now wants credit, which is new. The federal government stops at $200,000. The market that is supposed to cover the rest screens on a median minimum credit score of 670 and a median minimum income of $30,000, three quarters of graduate private loans are cosigned, and a review of thirty-four lenders concluded that over 40% of Americans would likely be denied by most of them, rising to 61% in majority-Black neighborhoods.15 A first-year medical student has no income by construction. A first-generation one often has no cosigner either.
For that reader the question stops being which career pays better and becomes which one will have them.
There are real answers and they have their own pages: Can You Actually Get the Money? for the gap and who fills it, If You Have No Cosigner for the credit problem, Institutional Loans for school-held money that isn't credit-based, and Scholarships & Debt-Free Service Paths for the routes that trade service for tuition. The school you pick is now a financing decision as much as an academic one.
What medicine offers this reader is the floor rather than the ceiling. The table already showed there's no ceiling advantage. What there is instead is a licensed profession, a hiring market that doesn't evaporate, a salary band you can look up at eighteen and roughly trust, and half the annual layoff risk of the other lane. When there is nothing behind you, a floor is worth more than a ceiling, and it costs a decade of low income and a debt the government will no longer fully finance.
And one thing the ledger cannot show at all. A physician's parents can retire. That is in none of these numbers, and for a lot of the people reading this it is the whole calculation.
What this page cannot tell you
It can't tell you whether you'd have been any good at the other thing.
It can't price three in the morning on the labor deck, and it won't pretend the ranking it produced is a recommendation.
The two people in it are composites. Every beat on his side corresponds to something in the data and every beat on yours is true to the training, but they are illustrations rather than a study, and the assumptions behind all of it are in the footnotes rather than hidden in a model nobody can see.
The mechanics belong to The Money: what the loans do to you over a career is The Personal Finance Crash Course, and alongside it What Doctors Actually Make, Can You Actually Get the Money?, and What You Borrow Before Medical School. If you're weighing which field to enter once you're in, that is Choosing a Specialty and Debt, Specialty, and the Life You Want.
Where this fits
Is Medicine the Right Path? is the wider version of this question, and the page the dinner came from. Medicine in the AI Era runs the volatility argument against your job instead of his. Can You Have a Family in Medicine? covers the same decade from the side the money can't see.
This page is educational and reflects sources current as of its review date; it isn't medical, financial, or legal advice. Last reviewed: 2026-08-12.
References
Footnotes
-
The model, and everything it assumes. The ledger, the breakeven ages and the sensitivity analysis come from a model I built for this page out of the sources below. It is arithmetic on sourced inputs rather than a research finding, and every constant it runs on is listed here so that you can disagree with any of them. Everything is in 2026 dollars, so a figure at sixty-five means what it would buy now. Both people save the same share of take-home pay, 15% centrally with 8% and 25% also run, and holding it equal matters because the moment you let the doctor save less the model just hands your own assumption back to you; against a national personal saving rate of 2.7% in June 2026, 15% is already generous to both. Real return 5%, with 3% and 7% also run. State income tax 5%, and running it at 0% or 9.3% moves the final gap by about $10,000. Both people consume the rest, which is the assumption nobody writes down: neither is quietly economizing to make the model come out. Excluded by design: home equity, inheritance, marriage, children, disability and business ownership. Physician income starts near the 25th percentile of the experience curve for a first attending job, inferred from MGMA's compensation-by-experience data rather than stated by it. First attending job is modeled at 29 for the hospitalist and 31 for the general surgeon, which ignores gap years; those are common and rising, and each one shifts the physician column later. ↩ ↩2
-
The academic literature on this comparison usually discounts the physician column by the probability of completing, on the reasoning that a comparison starting at "acceptance" has already assumed away the thing an eighteen-year-old is asking about — see Webber, Economics of Education Review 2016, and on discounting in medical education specifically, Walsh. This page doesn't weight it, because a probability-weighted ledger asks you to believe a discount you have no way to check. Stating the condition in the body instead is a deliberate choice and a less rigorous one than the literature's. ↩
-
AAMC Debt, Costs and Loan Repayment Fact Card, Class of 2025: median four-year cost of attendance $297,745 in-state public and $408,150 private. AAMC on the OBBBA federal aid changes and 34 CFR 685.200 for the end of Grad PLUS and the $50,000 annual / $200,000 aggregate professional cap. So the shortfall at the median is $97,745 public and $208,150 private. The full working, including the separate $257,500 lifetime ceiling and who it catches, is on Can You Actually Get the Money?. ↩
-
Federal Student Aid, interest rates for Direct Loans first disbursed 1 July 2026 to 30 June 2027: 8.07% for graduate and professional unsubsidized, accruing from disbursement rather than from graduation. Rates reset every July and apply per disbursement, so a four-year degree carries four different ones. ↩
-
BLS Employee Tenure Summary, January 2024: median tenure 2.7 years for workers aged 25–34, against 3.9 for all workers and 4.2 in the information sector. The short tenure is an age effect rather than a tech effect, which is why it appears here as ordinary rather than as a warning sign. ↩
-
levels.fyi 2025 — voluntary self-reported data, skewed toward higher-paying employers and toward engineers who choose to report. Median total compensation $155K entry, $226K mid, $312K senior, $457K staff, with 55–65% of a senior package being stock per the senior engineer leaderboard. Why this and BLS disagree by roughly a hundred thousand dollars: OEWS defines wages as base pay plus commissions and production bonuses, explicitly excludes nonproduction bonuses, and does not mention equity at all, while levels.fyi reports total compensation. One is measuring salary and the other salary plus bonus plus stock. A net-worth model needs money a person can actually save and vested shares are taxable income in the year they vest, so total compensation is the right measure here and BLS understates what a top-of-market engineer takes home. It also means an attending's $320,000 is contractual cash while a senior engineer's $312,000 is roughly a third contractual and two-thirds a claim on a share price, vesting over four years and forfeited on departure. Same number, different certainty. When someone tells you what a job pays, ask what the number includes. ↩
-
BLS Occupational Employment and Wage Statistics, May 2025, software developers: median $135,980, 10th percentile $82,460, 90th percentile $214,670. The Occupational Outlook Handbook projects 15% growth 2024–2034 with about 129,200 openings a year, which is a decade average rather than a statement about this year's market for a new graduate. ↩
-
AAMC Survey of Resident/Fellow Stipends and Benefits, 2025, reported via the AMA: $68,166 in PGY-1 and $73,301 by PGY-3. These are unweighted averages across programs rather than medians, so they are written as averages. ↩
-
ACGME Program Requirements for Graduate Medical Education in Internal Medicine, 2025, section VI.F. Work is limited to 80 hours a week averaged over four weeks, and residents "must be scheduled for a minimum of one day in seven free of clinical work and required education (when averaged over four weeks)." Both are limits rather than descriptions: a program can schedule better and many do, so a four-days-off month is what the rules permit rather than what every month looks like. The same section appears in every specialty's requirements; internal medicine is cited because it is the training this page's hospitalist goes through. ↩
-
What the borrowing cap does to forgiveness. Federal debt is capped at $200,000. The Repayment Assistance Plan takes a percentage of adjusted gross income on a sliding scale reaching 10%, which is roughly $30,000 a year on an attending salary, and waives whatever interest an on-time payment does not cover (34 CFR 685.209; RISE final rule, 1 May 2026). So the balance grows through medical school, when there is no payment to cover anything, and then falls steadily once an attending's payment exceeds the interest. In this model the hospitalist reaches the 120th payment with about $166,000 left to discharge, against the two to three hundred thousand a borrower who could take $400,000 federally used to arrive with. Forgiveness is worth materially less than the advice written before July 2026 says, and it is still worth a great deal. The debt it has never touched is the private tranche above the cap. Two mechanics matter regardless: 120 qualifying payments that need not be consecutive, with residency counting; and the plan you are on decides whether the clock runs at all, since RAP, IBR, PAYE and ICR qualify while the Tiered Standard Plan does not, so a resident who lands on the default earns no credit and pays more. Being at a qualifying employer is easier than it used to be, with 57.5% of physicians now employees and private practice at an all-time low of 42.2%. ⟳ Verify: the $166,000 is this model's arithmetic on the regulation rather than anyone's published finding. An earlier version of the model charged no interest during medical school and concluded the discharge was $0, which was wrong; check any figure like this against a servicer and a financial aid office before planning around it. ↩
-
BLS JOLTS Table 24, annual layoffs and discharges rates by industry, information against education and health services, 2021 to 2025. Used in preference to any private tracker: those use a discretionary definition of "tech company", revise retroactively, and report raw counts against an unstated base. On the door into that industry narrowing, three teams and three datasets point the same way: junior software vacancies fell 16.3% relative to senior across 5.7 million postings after November 2022; relative employment for 22-to-25-year-olds in the most AI-exposed occupations fell about 16% in payroll data, driven by reduced hiring rather than separations; and junior employment fell at firms adopting generative AI across 65 million résumés. The caveat ships with it: the NY Fed reports 7.0% unemployment for computer science and 7.8% for computer engineering, the confidence interval on the second spans roughly 4% to 11%, about 90% of CS graduates were employed, and Indeed Hiring Lab note that nearly half the decline in tech postings predates ChatGPT. ↩
-
The specialty decides it and the degree doesn't. Same debt, same caps, same savings rate, same market: in this model the general surgeon crosses the urban software engineer at 48 and finishes at $5.14M, while the hospitalist never crosses and finishes at $3.99M. Against a career that isn't software the physician wins comfortably, passing the mechanical or civil engineer at 36 and finishing $1.16M ahead. So medicine loses to software and beats most other professional work, and a reader silently comparing themselves to a friend in finance or consulting is running a different race than the one modeled here. That reproduces what Marcu et al., Academic Medicine 2017 found across six financing pathways, where borrowers started $300,000–$400,000 behind debt-free counterparts, orthopaedic surgery recovered in four to eleven years, and primary care never closed the gap; those figures use 2013-era debt, so under the 2026 caps the private share of the hole is larger. Worth holding against all of it: the St. Louis Fed's Demographics of Wealth series reports that the wealth premium for postgraduate-degree holders, as distinct from the income premium, fell from 403% for the 1930s birth cohort to 28% for the 1980s cohort, statistically indistinguishable from zero, with asset-price timing, tuition inflation and roughly tripled debt loads at 26 as the mechanisms (Emmons, Kent & Ricketts; see also Abel & Deitz, NY Fed, April 2025). An income premium does not mechanically become a wealth premium. ↩
-
BLS Current Population Survey Table 11b, 2025: 12.0% of software developers are 55 or older and 2.3% are 65 or older, against 21.0% and 8.2% for civil engineers and 23.2% for mechanical engineers. Median age for software developers is 38.6. ↩
-
Why the gap widens the better you assume the market is. Compounding pays for time before it pays for size, and the engineer contributed for nine more years. At a 3% real return the hospitalist finishes $141,000 behind the urban engineer; at 5%, $516,000 behind; at 7%, $1,380,000 behind, all at a 15% savings rate, and the pattern holds at 10% and 22%. Every viral post that cranks the return rate up to make investing look impressive is quietly strengthening the case against medicine as a financial decision. On the input itself: Damodaran — use the geometric rather than the arithmetic mean, since the 2.2-point gap between them is variance drag and the commonest source of inflated projections. Jordà et al. put equities at 8.39% real for 1870–2015 while Dimson, Marsh and Staunton put 1900–2025 at 6.6% real. They disagree by about 180 basis points on the same asset class, which is why this page runs three scenarios rather than picking one. ↩
-
Century Foundation and Protect Borrowers, March 2026, reviewing 34 private student lenders: median minimum credit score 670, median minimum income $30,000, 74.2% of graduate private loans cosigned, and the conclusion that over 40% of Americans would likely be denied by the vast majority of them, 61% in majority-Black neighborhoods and 48% in majority-Hispanic ones. On pricing, no government body publishes an average private student loan rate; the model's 9.0% is anchored on MEFA, the Massachusetts Educational Financing Authority, a nonprofit state authority that publishes a genuine full range rather than a teaser rate and offers a medical-school product, at 7.15–9.95% fixed when checked and cross-referenced against regulated TILA disclosures. Advertised floors near 2% require the shortest term, immediate repayment, autopay, top-decile credit and a cosigner simultaneously, and should never be quoted as a rate anyone gets. ⟳ Verify: MEFA republishes its rate as it moves, so the range above is a snapshot rather than a standing quote. The Century Foundation review is cited by name and date rather than by link. ↩