It isn’t enough to have great new devices, apps, and games — you also have to know how to use them. Here at The Verge, we offer step-by-step how-tos for experienced and new users who are working with online, macOS, Windows, Chrome OS, iOS, and Android apps, services, phones, laptops, and other tools. From simple instructions on how to install and use new devices, to little-known strategies on how to take advantage of hidden features and the best methods for adding power or storage, we’ve got your technological back.

It’s been a turbulent year for bitcoin, and now it’s time to talk about taxes. Most people who held on to bitcoin over the past year made money off of it, and as Americans prepare for income tax season, the IRS wants its cut of the profits. Amid unprecedented gains — and unprecedented enforcement efforts — this looks to be the year that tax collectors get serious about bitcoin earnings, which means it’s a very good time to make sure you’re doing everything right.

So let’s get into what you’re reporting and how to report it. To simplify things, we’re only talking about bitcoin here, but note that these general guidelines apply to other cryptocurrencies as well. Also, none of this is legal advice, so if you have specific questions, it’s best to consult with a tax lawyer or accountant.

Document everything

We’re talking about income tax, so your goal is to figure out your income from bitcoin in 2017. For the purposes of the IRS, that means bitcoin assets that were converted into non-bitcoin assets like cash or goods and services. Your bitcoin holdings aren’t taxable (at least not yet), but any time you sold bitcoin or used it to buy something, you were accruing taxable income.

You’ve already got records of most of those transactions, either on the blockchain or from your wallet provider, but converting it to dollars can be a real hassle since you’ll need to run the bitcoin value against the price of bitcoin at the time of the transaction. (You can look up the historical price of bitcoin here.)

Do your best to document everything

First, you’ll want to download all transaction data from the exchanges you use, usually available as CSV files, suggests Vincenzo Villamena, managing partner at Online Taxman, an accounting firm that specializes in cryptocurrency. Some exchanges, like Coinbase, will send certain US users form 1099-K if they have received “at least $20,000 cash for sales of cryptocurrency related to at least 200 transactions in a calendar year.” If you don’t use an exchange, just do your best to document everything.

There is also software that can help with doing bitcoin taxes, such as Bitcoin.Tax and CoinTracking.Info. Bitcoin.Tax lets you upload CSV files from exchanges, and it’s free for up to 100 transactions. CoinTracking.Info does the same, and it’s free for up to 200 transactions. (As pointed out by Forbes, which reviewed both software, the programs let you cherry-pick which accounting method you’d report by after the year has ended. Some of the methods may not be IRS compliant.)

Where to report Bitcoin income

Most people will have income from buying bitcoin and then selling it at a higher price. If that’s true for you, then any income from the sales needs to be reported on Schedule D, an attachment to Form 1040.

How you report the sales will depend on how long ago you bought your bitcoin. If you’ve held the bitcoin less than a year before transacting with it, it’s taxed as a short-term capital gain, which is still taxed at the same rate as ordinary income. But if you’ve held bitcoin longer than a year before using it, bitcoin is taxed as a long-term capital gain at lower rates of anywhere from 0 to 20 percent, also depending on what income bracket you fall under. If you’re in the top three highest income brackets, you also have to pay a 3.8 percent tax on net investment income. (It’s also worth noting that while not being taxed as ordinary income, capital gains may increase your overall adjusted gross income, which could impact which tax bracket you ultimately fall under.)

In every case, the tax rate on your bitcoin sales depends on your method of acquiring bitcoin and the length of time you’ve held it. Here’s a chart, because it’s complicated. Just know you’ll be making heavy use of the first few pages of your tax return as well as Schedule D.

How bitcoin is taxed Method obtained Duration held How to report Additional taxes Method obtained Duration held How to report Additional taxes Received for services N/A Ordinary income State income tax Bought for investment Less than a year Ordinary income State income tax Bought for investment More than a year Capital gain 3.8 percent for top three tax brackets Mined N/A Ordinary income Self-employment tax if applicable Bitcoin fork N/A Ordinary income TBA

Things get more interesting if you were mining your own bitcoin. Any bitcoin gained through mining is taxed as ordinary income, based on the “fair market value” of the bitcoin at the date it was received. (Again, you can look up the historical price of bitcoin here.) Additionally, if the mining counts as a trade or business transaction, and the taxpayer isn’t doing it for an employer but for themselves, they have to pay the self-employment tax, which is 15.3 percent on the first $127,200 of net income and 2.9 percent on any income in excess of $128,400.

If you were paid for goods or services in bitcoin, it gets taxed as ordinary income. (It technically is income, just in a different currency.) Depending on your income bracket for 2017, the federal tax rate can be anywhere from 10 percent to 39.6 percent. The bitcoin will also be subject to state income tax.

If your bitcoin account is held abroad where the private keys are owned directly by the exchange, you get double the fun: the value of the account has to be reported to the US Treasury using FinCen form 114, and to the IRS with the form 8938. US residents and citizens who own less than $10,000 of assets abroad don’t have to report.

If you have any other questions, you can look to the guidance on virtual currencies released by the IRS in 2014. It’s a few years old, but it’s still the IRS’s best guidance on the issue, and the agency referred questions back to the 2014 document when asked for comment.

What about the bitcoin fork?

On August 1st last year, bitcoin was forked into two digital currencies: bitcoin and bitcoin cash. The new bitcoin cash is also taxable income, although the IRS has not yet addressed this event and provided guidance for cryptocurrency forks.

“The problem is, we have the tax code, we have all the regulations, we have this 2014 notice which now seems like it’s 100 years old and so we don’t have any guidance,” says Connecticut-based tax lawyer Suzanne Walsh. “The IRS is going to come out and say, here’s what this is and right now we’re only guessing.”

Other new changes

The Republican tax reform bill that passed in December not only shifted around tax income brackets, but it also cut out a bitcoin investor loophole. This will only take effect when filing 2018 taxes in 2019. The bill eliminated an exemption where bitcoin investors switching over to Ethereum, litecoin, or other altcoins could defer paying taxes on the original bitcoin. This was known as a “like kind exchange,” also known as a 1031 exchange. In 2018 tax returns, that exemption will only apply to “real property,” meaning real estate.

Why you really shouldn’t skip out on Bitcoin taxes

The IRS has gone after bitcoin tax evaders before. In 2016, the IRS requested the Coinbase records of all the people who bought bitcoin from 2013 to 2015. After examining tax returns from those years, the IRS found that only 800 some people reported their bitcoin gains on the form 8949 each year. (Form 8949 is a summary of bitcoin gains that basically supplements form 1099, which cryptocurrency taxpayers don’t get from exchanges.)

The IRS partnered in 2015 with a company called Chainanalysis to identify owners of digital wallets who haven’t been paying their bitcoin taxes, according to a contract discovered by The Daily Beast last year. Still, Chainanalysis only has information on 25 percent of all bitcoin addresses, its co-founder Jonathan Lewis wrote to the IRS, meaning that the other 75 percent remain anonymous. It’s likely that the IRS will continue to have to lean on outside consultants like Chainanalysis, says Walsh.

If the IRS catches on that you didn’t pay the tax, you’ll be dealt with like any other tax evader. You’ll be sent a deficiency notice which you can either pay or contest. And the IRS could always later catch you in a regular audit, says Walsh. Common fees include a “substantial understatement” penalty and “negligence or disregard of the rules” penalty, which are an additional 20 percent of the net understatement of tax. If the IRS thinks you knew about the bitcoin tax rates and laws and faked your tax return anyway, it will charge you an additional 75 percent of the underpayment for fraud.

“It’s obviously directly fraudulent.”

It’s also likely that your accountant won’t sign off on a tax return where you underreported capital gains, due to ethical concerns. “Willingly knowing that somebody had capital gains that were reportable is like a pretty bad offense. It’s obviously directly fraudulent,” says Villamena. “It’s a lot worse than if someone just added an extra meal expense that was obviously social and business together.”

Ways to minimize bitcoin taxes

You can donate cryptocurrency to charities but you must donate directly to the charity, as selling it first would be taxable. While charities like Goodwill may not accept bitcoin, you can still donate to causes like The Water Project, Wikileaks, and the Internet Archive to name a few. Robert Wood, a tax lawyer who’s written on cryptocurrency taxes for Coin Telegraph, says, donating bitcoin to charity “can be a smart move, generating a tax deduction for the market value, without having to pay tax on the appreciation.”

You can also hold on to the bitcoin long-term, disregarding the downturn in bitcoin prices recently and any desire to cash out early, in order to defer taxation, Villamena suggests.

He also added that since his firm has an international focus and many of his clients have foreign spouses, he sometimes recommends them to hold their cryptocurrency under their spouses’ names. Other countries have lower tax rates than the US. Germany, for instance, treats cryptocurrency as a currency, while Denmark doesn’t tax capital gains.

This is all we know about US tax laws on bitcoin so far. It’s enough to answer most questions, but as cryptocurrencies keep evolving, and new situations like bitcoin forks arise, we’ll soon need more guidance from the IRS.