The income tax laws work exactly the same way when you sell something online--whether in an online auction or otherwise--as when you sell an item in the physical world. If you sell at a gain--that is, you get more than you paid for the item--you have income. If you sell an item for less than you paid for it, you have a loss. How this income and loss is treated depends on what type of online seller you are.
Many people occasionally sell items online through auction website like eBay or online classified ad services like Craigslist. These sales are the online equivalent of garage or yard sales. Usually, when you sell old personal use property (such as old clothing) online you incur a loss--that is, you get less than you paid for it. Losses on the sale of personal use property (such as clothing or personal use cars) are nondeductible personal losses. The IRS doesn't expect you to report these on your tax return. Nobody cares about them. An occasional seller who sells an item at a gain would have a taxable capital gain that is supposed to be reported to the IRS (see the discussion of collectors or investors below).
A hobby is an activity you engage in for a reason other than earning a profit--for example, you create art for enjoyment or collect matchbooks for fun. If you sell something created or acquired as a hobby online, the profit you earn is taxable income that is supposed to be reported on your tax return. You may deduct your hobby expenses only as a miscellaneous itemized deduction on your return. This means these expenses are deductible only to the extent they exceed 2% of your adjusted gross income. Moreover, your deduction for hobby expenses may not exceed your income from the hobby for the year. Any excess amount is not deductible and may not be carried forward to future years. To learn more, see Nolo's article, Can You Deduct Your Expenses From a Hobby?
Unlike a hobbyist, an investor wants to earn a profit, but is not engaged in a full-fledged business. These people purchase property with a view to having it increase in value over time. For example, an investor coin collector purchases coins primarily to earn a profit by selling or trading them--not for enjoyment. When an investor sells an item at a gain, the amount is a taxable capital gain that must be reported on IRS Schedule D. Income tax must be paid on the profit at capital gains rates. Net capital gains from selling collectibles (such as coins or art) are taxed at a maximum 28% rate. If an investor sells a collectible at a loss, the loss is a capital loss that may be deducted from any capital gains realized during the year. If capital losses exceed capital gains for the year, a maximum of $3,000 of the loss may be deducted from other income with the remainder, if any, carried forward to future years.
If selling items online is your business, the same tax rules apply to you as for any other business. Online selling is a business if you regularly engage in it primarily to earn a profit. If you earn a profit in any three out of five years, your activity is presumed to be a business. You don't have to engage in online selling full-time for it to be a business, but you must work at it regularly.
When you have an online sales business, you may deduct all of your business expenses from your business income. You pay income tax on your profits at regular tax rates. If you incur a loss, you may deduct it from other income during the year. When you have a business, you must pay self-employment taxes (Social Security and Medicare taxes) as well as income taxes.