For context, I'm in the UK, but I suspect the answer will apply regardless of the jurisdiction.
I'm of the understanding that if you buy BTC and then sell for profit at a later date, you're liable for Capital Gains Tax. But what's the tax situation if you're mining coins, and then selling them on your local exchange? My intuition is that it can't be CGT, because you didn't buy the coins in the first place - in the extreme case, you bought a mining rig, which was then used to produce coins, which you later sold. But I find it impossible to believe that you don't have to declare income gained like this. So what does it fall under?
Capital gains? That is what happens when a person or company buys bitcoins, holds them for a while, then sells them at a profit. Mining is different.
Coins are a virtual good that person or company is manufacturing as a miner. This is business activity, which should be organized under a business entity, like and LLC or corporation. Without such an entity set-up, most jurisdictions would be defaulted to a sole proprietorship.
Costs at least include electricity + hardware for mining. Subtract the costs from the revenues to get profit. Profits are taxed differently based on business structure and jurisdiction. Business profits get taxed, but remember that
money a person pays himself as an employee of his own business is salary, so that would be taxed as income.