Finances for CS Ph.D. students

This post is based upon a few recent conversations I've had with my own Ph.D. students.  Its intended audience is Ph.D. students at mid-to-upper-end computer science programs in the United States, who are either US citizens/permanent residents, or plan to remain and retire in the U.S.

In graduate school,
you too can dress better than a professor!
Welcome to graduate school in computer science, where not only do we not charge you tuition, but we shower you with so much money that you can afford to eat, have a house over your head, and wear shirts that have fewer than five holes in them!

In fact, you can probably do better than that, and get a nice boost to being financially independent.  But it takes some advance planning.

Why Bother?


Mostly, because flexibility -- or, more crassly, "FU Money."  (You can google that in case the meaning isn't obvious.)  Getting started early on the path to financial independence lets you be in charge of your life.  You may also discover halfway through your program that there's this crazy nonprofit you want to devote all of your effort to, which pays a living but not quite so lucrative wage, and wonder if you'll be able to get by on it.  You may graduate, get a job at Googlebooksoftetc., and within a few years earn north of $300k/year.   Or choose to help the government fix healthcare.gov.  Or decide that retiring from CS at 30 is more your style. You may live to 100 and work until the day you die, or die of cancer less than 20 years into your post-graduate career.  You may exit computer science and raise rabbits.

Life is full of twists, and a pile of cash + living under your means makes a nice cushion that lets you do what you want with your life, instead of being forced into a path for financial reasons.

TL;DR, you long-winded academic?


Spend less than you earn on your stipend.  Save as much as possible from your internships.  Contribute the max to a Roth IRA.  Save the rest in a taxable account.  Invest those accounts in Vanguard low-overhead index funds.

The long version, with numbers?


You've typically got three income sources in graduate school:
  1. Your stipend.  The amounts vary, but something like $2500/month isn't unusual.
  2. Summer internships.  Most students should do one or two of these during their Ph.D. program - it's a great way to meet new researchers, get exposed to different problems and environments, etc.  Pay varies, but is often in the range of $70-100k annually (which may come to about $21-25k over the summer).
  3. Consulting gigs / side jobs.  Can be a nice supplement to your income, but don't let them distract you from finishing up and graduating.  Bonus points if they dovetail with your research in a non-conflict-of-interest way, of course.
As a full-time student, you don't pay social security taxes on your stipend.  And when you're earning $30k/year, your top marginal tax rate will be in the 15% bracket.  But, of course, that doesn't mean you'll be paying 15% of your income in taxes.  In fact, it'll be far, far less.  Your first ~$6k is covered under the standard deduction and personal exemption.  Required texbooks can also be deducted from that.  And then factor in that US taxes are marginal rates:  You pay 10% on the first ~$9275 after the deduction and exemption, 15% on the amount from ~$9275 to ~$37k, and so on.  Which means that you'll probably have an effective federal tax rate of about 10.5% on a $30k salary, or $3,136 in taxes.

You'll pay more on your internship income, but in general, your tax situation is pretty great.  Of course, that's a silver lining on the fact that grad school stipends are small, but it beats paying for grad school!

This means that from a retirement and savings account, you want to operate entirely in post-tax money.  This is, with great likelihood, the lowest tax bracket you're going to find yourself in for the rest of your life.

Of course, for any of this to make sense, you have to spend less than you earn.  Grad school's a great opportunity to do so.  (Almost) Everyone lives in a dump during grad school.  Might as well revel in it a bit.  Your friends aren't going to be wasting their money either, so keeping up with the joneses pretty much means cleaning your apartment regularly and not leaving rotting food in your office.

OK, I just made that last bit up to try to keep my lab cleaner.  But seriously - grad school is full of affordable fun, dinner parties, and whatnot.  Take advantage of it.  When you spend money, do so mindfully -- mindful of things that actually bring happiness (or relieve stress), as opposed to what a bunch of marketing people want you to think do.

Housing - your biggest(ish) expense


It may or may not be worthwhile to consider purchasing (& selling) a house, depending on where you live.  Consult the NYT's rent vs buy calculator if you're coming into the picture with enough money to ponder purchasing.  (I've known several grad students in Pittsburgh who've done this, for example.  One bought a quite small house and lived there for six years;  another bought a condo and had roommates.  I didn't know anyone in Boston who did.  But use the 'advanced settings' part of the calculator, because for the short time periods involved in grad school, you need to carefully account for closing costs.)

Health Care - a potential opportunity


Most universities have a single plan that they offer for grad students, but if yours allows Ph.D. students to enroll in a high-deductible plan with a Health Savings Account (HSA) and you're overall healthy, jump on this.  HSAs offer some interesting opportunities as a savings/retirement account.  But run the numbers, and make sure you have enough cash socked away to cover your deductible if you get hospitalized.

Retirement Savings Options in the US


Wait, wait - retirement?  That's so far off!

Bear with me - we're mostly looking at tax-advantaged ways to save money, and the retirement savings accounts are the way to do that.  Once we get to the end of this, you'll see that we'll settle on options that give you a lot of flexibility about when you spend or withdraw that money.

There are a few major paths to saving for retirement in the U.S.
  1. Social security.  Work, pay in to the social security system, and when you retire, the government will send you monthly checks.  For most of us considering computer science careers, the dollars involved are not sufficient for a well-funded retirement.  (And there's always uncertainty about what will happen to SS as the political environment evolves.)
  2. Pensions, aka "defined benefit plans".  Work for N years, your employer promises that they'll pay you some percentage of your salary for the rest of your life.  Historically popular, but not as good a match when you have highly-mobile employees in a rapidly changing field.  Such as ours.
  3. Defined contribution plans - employer.  Your employer automatically contributes some chunk of money to a retirement plan on your behalf.  These funds are invested in some way -- the stock market, for example.
  4. Defined contribution plans - employee.  You contribute some of your own salary, pre-tax, and it's invested as in 3 above.  Here, pre-tax means that the contributed amount reduces your gross income for tax purposes.
  5. IRAs of various flavors.  Individual retirement accounts, which are entirely self-managed.  Can be funded with pre-tax money (e.g., "Traditional IRA"s), or with post-tax money in an advantaged way ("Roth IRAs").  More on this in a second.
  6. Taxable investments.  Conventional investment accounts funded with post-tax money;  taxes are due on investment returns.  Very flexible, but maximally taxed.
At most schools, grad students aren't eligible for the pensions or defined contribution plans.  Because of the tax bracket issues mentioned above, the most attractive investment option for grad students is the Roth IRA.

What the heck is a Roth IRA?


It's a retirement account funded with post-tax money (i.e., funds on which you have already paid taxes).  It has some cool properties:
  1. Flexibility:  You can withdraw your contributions at any time with no penalty.  Let me repeat that again:  If you put in $15k into a Roth during grad school, you can pull that $15k out at any time you need the money.
  2. No taxes during growth:  As the money grows while invested, you don't pay any taxes on the intermediate gains.
  3. No taxes on retirement withdrawals:  Even on the gains.  If you anticipate retiring at a higher tax bracket than you were living on as a grad student (likely!), this becomes a huge win.  You paid 10% taxes on your money, invested it, and then pay no more taxes on it, even though you're living a 25% tax bracket lifestyle in retirement.
  4. Some ways to withdraw early if needed.  Buying a house, deaths in the family, etc.  Hopefully you can ignore all of this.
Of course, there are limits on good things.  You can contribute up to $5,500 per year to a Roth IRA, but if you earn more than $117k/year as a single filer, the limit starts to phase out.  You will probably earn more than $117k/year once you graduate, at which point life gets more complicated.  (Note that I'm oversimplifying, because this article isn't aimed at people earning over $100k/year.  The next one will be.)

The total amount you'll be able to put into a Roth is relatively small because of this $5500/year limit, but future-you will love you for every cent you get in there, because of the flexibility and tax advantages.  If you retire early, a Roth can be a very useful tool in retirement tax reduction.  If the poop really hits the oscillating blades, a Roth is a great source of emergency cash.

If you're paid only by a scholarship or fellowship, check out this article first - you need to have earned income to make Roth contributions.  Most GSes do.  If you get a W-2 with earned income in box 1, you're good.

What do I invest my Roth in?


For most people, get an account at Vanguard, put your Roth there, and invest the funds either in:
  1. Laziest approach:  Target Retirement 20XX fund.  Has slightly higher expense ratio than doing it yourself, but for a far-out target date, has a nice balance of mostly stocks, US-centric with some international exposure, and a bit of bonds to reduce volatility slightly.
  2. Lazy, lower expense ratio, but less diversified:  VTSMX / VTSAX.  (Same fund, different minimum investment, different expense ratios).  Total stock market index fund.  US-centric -- but remember that a lot of major US companies are themselves multinationals, so it's not as horrible as it seems.
  3. DIY target retirement fund:  See the Bogleheads Lazy Funds list, and implement on your own.
When you've got less than about $50k in play, I'd go with the target retirement fund.  The expense ratio differences start to become more important once you're above the minimum thresholds for the "admiral shares" classes of Vanguard funds (often $10k for each fund you invest in).

Exceptions to this suggestion:  If you anticipate major expenses that you think will require dipping into your Roth (having a child in grad school?), you might want to invest it in a lower-volatility mix.  The vanguard "Target Retirement" fund (VTINX, with no date -- this one's aimed at people already retired) might be a reasonable choice, down to the short-term bond fund VFSUX.

Don't day-trade, don't try to time the market, and don't invest in a tiny basket of individual stocks.  Don't pay a stockbroker to tell you what stock is "hot".  Don't pay high expense ratios for actively managed funds.  Many, many of your professional colleagues (and math and physics Ph.Ds) are out there at various quant and HFT funds making their living by preying on people who think they can do better.  You're probably very smart and experienced at programming and many things related to this field, but you're still not likely to win.  For the most part, you're at a disadvantage:  The professionals are also smart like you, but they have access to experience, resources, and information that you don't.  Don't be a sucker.  The diversified index funds achieve great results with very low expenses, and mostly beat the pants off of the places your friends work anyway.  If you want to play that game, finish up your Ph.D. and then go get a job in that industry where you get to play the game using other people's money, and you get access to real resources.

I've still got too much money left - what now?


If it were me, I'd start piling it up in your taxable account(s).  It's not unlikely that you'll have some heavier-duty cash flow needs in the first month of your job after you graduate -- I think I floated about $5k of moving expenses, a security deposit, first and last month's rent, and purchased a car all in my first month at CMU.  That was surprisingly non-stressful with a modest cash cushion.

Some universities allow contributions to a Roth 403(b), even if you're not eligible for the normal retirement contributions.  Check with your HR/benefits office.

But you should also examine your debt picture.  If you have high-interest student loans or other debt, pay 'em off ASAP if they're incurring interest during grad school.  If they're subsidized and not incurring interest while you're still in school, you can play the game of stashing your money in an interest-yielding investment (savings or market - up to you), and then paying them off the second you graduate.  This is very personality-dependent.

Congratulations and good luck on your grad school experience!

Comments

Popular posts from this blog

Reflecting on CS Graduate Admissions

Chili Crisp Showdown: Laoganma and Flybyjing

Two examples from the computer science review and publication process