Editorial Note: Forbes may earn a commission on sales made from partner links on this page, but that doesn’t affect our editors’ opinions or evaluations.

The whole world is watching as Bitcoin and the rest of the cryptocurrency market keep notching new record highs. The Internal Revenue Service (IRS) is watching, too. If you own cryptocurrency, like Bitcoin or Ethereum, you need to understand how it impacts your tax liability every time you buy it, sell it or mine it.

What Is Cryptocurrency?

A cryptocurrency is a decentralized, digital store of value and medium of exchange. It’s not a currency with any physical tokens, like dollar bills, and it lacks any centralized governmental oversight.

Instead, cryptocurrency relies on encrypted, distributed ledgers—so-called blockchain technology—to record and verify all transactions. Think of blockchain ledgers as a constantly updated checkbook that tracks every single transaction ever made in a given cryptocurrency.

Bitcoin was the first cryptocurrency, launched in 2009. Today there are thousands of others in circulation, including ethereum, bitcoin cash, litecoin, ripple and dogecoin.

How Is Cryptocurrency Taxed?

Crypto taxes are based on a 2014 IRS ruling that determined cryptocurrency should be treated as a capital asset (like stocks or bonds), rather than a currency (like dollars or euros). This decision has major ramifications for people who own crypto, as it opens them up to more complicated taxes.

Capital assets are taxed whenever they are sold at a profit. When you purchase goods or services with cryptocurrency, and the amount of crypto you spend has gained in value over what you paid for it, your spending incurs capital gains taxes.

Let’s say you bought $20 worth of Bitcoin and held it as it rose in value to $200. If you used the bitcoin to buy $200 worth of groceries, you’d owe capital gains taxes on the $180 in profit you’d realized—even though it seems as if you spent the Bitcoin, rather than sold it. For the IRS, it’s the same thing.

The fact that the IRS decided to tax crypto as a capital asset may have been because of the way most people treat it, says Jeff Hoopes, an associate professor at the University of North Carolina and research director of the UNC Tax Center. “I assume [the IRS] decided this because most people hold crypto as an investment, and we tax the appreciation on capital assets held as an investment,” he says.

But the IRS’s decision may have also been a pragmatic move, says Jon Feldhammer, tax partner at Baker Botts. “[Cryptocurrency] started having trading volumes in the tens of millions of dollars each day, and it was clear the IRS was missing out on a significant tax revenue source,“ he says.

Capital Gains vs. Capital Losses

Here’s some good news for crypto taxes: You only owe taxes if you spend or sell it and realize a profit. If you sell or spend your crypto at a loss, you don’t owe any taxes on the transaction.

If you bought $10,000 in Bitcoin and sold it for $13,000, for example, your taxable gain would be $3,000. But if you sold the same Bitcoin for $7,000 you’d owe nothing in taxes—and could even use part of your $3,000 in Bitcoin losses to offset other investment gains.

How Much Do I Owe in Crypto Taxes?

How much you owe in cryptocurrency taxes depends on your annual income and how long you’ve held your cryptocurrency.

  • If you’ve owned your coins for less than one year before spending or selling them, any profits would be short-term capital gains, taxed at your normal income tax rate.
  • If you’ve held your crypto for one year or more, any profit would be long-term capital gains, taxed at a lower rate, determined by your annual income.

If you earn cryptocurrency by mining it, or receive it as a promotion or as payment for goods or services, it counts as regular taxable income. You owe tax on the entire value of the crypto on the day you received it, at your regular income tax rate.

In addition, if you hold cryptocurrency from these activities, and either spend or sell them later for more than their value when you first received them, you owe short- or long-term capital gains taxes on the profits, based on how long you’ve held it.

Do I Owe Taxes on Cryptocurrency?

Whether you owe taxes on your cryptocurrency depends on how you got it and how you use it.

Did you mine cryptocurrency? “Mining” crypto is when you use computers to solve complicated equations and record data on the blockchain. In exchange for this work, you may receive payment in new crypto tokens. You owe taxes on the entire value of cryptocurrency you’ve obtained by mining.

Did you get crypto as a reward or an airdrop? If you receive cryptocurrency through a marketing promotion or an airdrop, it counts as taxable income.

Did you receive payment for goods or services in cryptocurrency? If someone pays you crypto for goods or services rendered, the entire payment counts as taxable income, just as if they paid you in cash. Unlike a cash payment, though, your customer might also owe income taxes if their crypto provides them with greater value than they paid for it.

Did you sell cryptocurrency to realize an investment gain? If you sell crypto for more than you paid for it, you owe tax on the gain as you would with stocks or mutual funds.

Did you convert or exchange one crypto for another? When you convert or exchange crypto—swapping bitcoin for ethereum, for example—you owe taxes on any gains you earn in the transaction. If you purchased $400 worth of bitcoin and used it to buy $1,000 worth of ethereum, you’d owe taxes on $600 in realized profit, even though you’re just exchanging one crypto for another.

While this might seem like a lot to track, don’t take any shortcuts. “Taxpayers are required to report their crypto transactions on their tax returns,” says Feldhammer. “The IRS is cracking down on this.”