How software engineers save taxes?


Like many software engineers, I pay significant portion of my gross income as taxes. I naively assumed that there was no room to improve my tax situation. During a year-end vacation, I had read books and articles about taxes, and reviewed my pay slips and tax returns in the past. I was surprised that there were a lot of ways for people like us to save taxes. Here is a list of best practices.


Get the most out of your pay check

Your tax saving starts from reducing your taxable income that is used to calculate federal, state and medicare taxes. When done well, your take-home-pay will get bigger.

1. Health Saving Account (HSA)

If your employer provides a high-deductible health plan with HSA, you can switch to it from your current health plan. HSA will save current and future taxes.

2. Flexible Spending Account (FSA)

If your employer provides FSA, consider it. Your contribution will be excluded from taxable income.

  • Note that FSA is not for saving, but spending. The money you contributed must be spent, otherwise it will disappear, except small amount your employer allows to carry over to next year. So if you don’t anticipate any spending, you don’t' need FSA.

  • There are several types of FSA. Each type restricts where money can be used. If you have HSA already, you will get Limited-use FSA that is pretty much for dental and vision only.

3. Traditional 401k

Any high-income earners should consider traditional 401k. You can avoid paying taxes on the contributions under current high marginal tax rate. You only need to pay taxes when you withdraw money for your retirement under future marginal tax rate.

  • Traditional 401k is a better choice for high-income professionals because we most likely have a lower marginal tax rate when retired. Even if it would be not the case, deferring tax into future is a good choice.


PUT MONEY inTO TAx-advantaged accounts

Generally, retirement accounts are only tax-advantaged accounts we can use. You should consider putting as much money as possible into these retirement accounts and convert them Roth, so your money grow tax-free forever.

1. Mega Backdoor Roth 401k

Table 1. 401k Contribution Limit

Table 1. 401k Contribution Limit

If your employer supports after-tax 401k, consider contributing to its maximum. Then you can convert the contribution to Roth 401k. This is called “Mega Backdoor Roth 401k” because it is so good.

  • Roth 401k is a remarkable retirement account. Your money in Roth 401k will grow tax-free. Which means you pay no taxes on withdrawal (distribution). Roth money has other advantages to traditional 401k such as there is no required minimum distribution.

  • For Roth conversion, consult to your 401k plan provider e.g. Vanguard, Fidelity, etc. Some plan support automated conversion, so you don’t need to call them frequently.

2. Backdoor Roth IRA

Table 2. Traditional IRA Contribution Limit.

Table 2. Traditional IRA Contribution Limit.

Many of high-income earners are not interested in putting money into the traditional IRA because there is no tax benefit. You cannot claim it as deductible in your income tax return due to the income limits.

But you can convert it to Roth IRA to enjoy the benefit of Roth! This is a legit loophole called “Backdoor Roth IRA”.

  • For Roth conversion, consult to your IRA provider e.g. Vanguard, Fidelity, etc. Many providers support you do with a few clicks.


Minimize taxes on your taxable accounts

After maxing out the tax-advantaged retirement accounts, your savings will be invested into taxable accounts such as brokerage. Your dividends and capital gains could be taxed at marginal income tax rate (highest bracket) + 3.8% Obamacare surtax. We need to avoid such situations as much as possible.

1. Choose most tax-sensitive cost basis options

When you sell stocks or funds, you get capital gains (or losses). Your gains are calculated based on the cost basis (how much you paid originally). If you purchased the same individual stocks or funds for multiple times at different prices, it would be best to sell the shares you paid the highest price (higher cost basis) to minimize taxable capital gains (or maximize capital losses).

However, you won’t know if this would happen until you check your brokerage account. Typically, as default, your brokerage accounts are configured to use the “First In, First Out (FIFO)” method. Which means the shares with the oldest acquisition date are sold first, regardless of cost.

You can change this configuration to better methods such as "Tax-Sensitive” method. Fidelity explains this method is that “shares with the lowest tax cost per share are sold first, starting with shares that have a loss (from greatest to smallest loss).”

Now check your brokerage accounts.

2. Make capital gains long term

Table 3. Capital Gain Tax Rates

Table 3. Capital Gain Tax Rates

If you sell your investment holdings within 1 year of ownership, your capital gains are considered as short term that is taxed at your marginal tax rate (highest income tax bracket).

If you hold the asset more than 1 year, your capital gains will be considered as long term, and taxed at lower capital gain tax rates (15% for most of high-income earners).

If your income exceeds certain threshold, 3.8% Obamacare surtax will be added. See a table below.

Table 4. Obamacare Surtax

Table 4. Obamacare Surtax

3. Make dividend qualified

Table 5. Dividends Tax Rates

Table 5. Dividends Tax Rates

Dividends that do not quality certain criteria are considered as “ordinary dividends” and taxed at your marginal tax rate.

Dividends that do qualify are taxed at 15% for most of high-income earners.

If your income exceeds certain threshold, 3.8% Obamacare surtax will be added.

4. Capital Loss Harvesting (tax loss harvesting)

When you have capital losses, you can use them to reduce taxes.

  • Losses on your investments are first used to offset capital gains of the same type. Short term capital loss is used to offset short term capital gains. Long term capital loss is used to offset long term capital gains.

  • Net losses of either type can then be deducted against the other kind of gain.

  • If you have an overall net capital loss for the year, you can deduct up to $3,000 of that from your taxable income in the tax return.

  • Any excess net capital loss can be carried over to subsequent years to be deducted against capital gains and against up to $3,000 of other kinds of income.

That’s all for now. Happy tax saving!

I hate paying taxes. But I love the civilization they give me.
— Oliver Wendell Holmes