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. Under prior law, hobbyists could claim as an itemized deduction their hobby-related expenses up to the amount of income the hobby earned during the year. However, the Tax Cuts and Jobs Act completely eliminates the itemized deduction for hobby expenses, along with many other miscellaneous itemized deductions, effective starting 2018 through 2025. This means that taxpayers will not be able to deduct any expenses they earn from hobbies during these years, but they still have to report and pay tax on any income they earn from a hobby. The deduction is scheduled to return in 2026. 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.