Short-term capital gains are taxed exactly like income and will be taxed at whatever tax bracket you fall into which ranges from 10% to 39.6%. The exact rate at which your long-term capital gains are taxed is dependent upon your overall tax bracket (including the capital gains). For 2017, single individuals (and married individuals filing separately), there is no long-term capital gains tax for those whose total taxable income is under $37,950. This number increases to $50,800 for Head of Household filers and to $75,900 for those who are married and filing jointly. A large majority of the US falls into these categories, but a savvy investor like you may not be so lucky. If your taxable income exceeds these thresholds, these long-term capital gains are taxed at 15% (or 20% for the highest tax bracket).

When it comes to tax liability, these capital gains can be offset by any capital losses you incurred in the same time period when calculating your net capital gain. If you made a Capital gain of $10,000 and took a loss of $1,000 on another investment, your net capital gains are only $9,000 — the amount subject to taxation. It’s valuable to know that when you are calculating your net gains or losses that a loss in either short or long term capital can be applied to gains in the other.

You can manufacture a loss by selling an investment which is currently selling for less than you paid for it (or the value it had when you received it) to negate your capital gains, or effect which tax bracket you fall into. However, remember you cannot buy back the investment you sold off until 30 days have passed without violating the ‘Wash-Sale Rule’ which would negate the loss for this round of taxes and have other consequences we can talk about another time. You can deduct as much as $3000 from your total income if you have net losses at the end of the day. Any amount over $3000 can be carried over into the next year.

It should be noted there may be local and state tax implications for your cryptocurrency assets as well, and you should consult local resources regarding these. The most important aspect to all of this is keeping good records of your trades and acquisitions. You want to be able to accurately track the basis of any cryptocurrency you own so you can make informed decisions regarding the timing of sales and income reporting.

The burden for reporting these gains and losses is on the individual investor/owner for the most part (although some platforms are providing documentation for you depending on the value of your portfolio), and it is best to stay on top of your assets to avoid owing the IRS any back taxes or being under the threat of a tax evasion charge.

Now for the good news. You can sidestep all of these capital gains tax issues with your investment by trading your cryptocurrency within a Self-Directed IRA. Self-Directed IRAs will let you make the calls about what to invest in, including cryptocurrency. Assets within an IRA are sheltered from taxes while they are held in the fund. The assets won’t be taxed for any capital gains made, though it also means you won’t be able to claim any losses against your annual income.

The IRA will be taxed eventually when you take distributions from it, but only as basic income. Generally, standard income is taxed at a higher rate than capital gains which is important if you think you’ll be in a higher tax bracket when you retire.

Alternatively, you can set up a Self-Directed Roth IRA where your initial investment is made with post-tax money, but you avoid tax consequences from any gains the funds make as well as on distribution. This limits initial investment, but can really make a difference in the long run if you’ve made some clever acquisitions by dodging the capital gains tax with a Roth IRA. Even if you need the funds before retirement (which you probably will), pulling the retirement fund early incurs a tax penalty of 10%, which is still below the lowest capital gains bracket of 15%.