In 2011 I accidentally bought $1000 worth of stock in a brokerage account and immediately sold it the same day for $985 (a $15 loss). The IRS is now claiming I owe $280 in taxes on $985 of income. Is something wrong here?
What's wrong is that you didn't report the sale, while the broker did. But in 2011, the broker was only required to report the proceeds ($985), not the basis ($1000), so the IRS doesn't know how much you paid for it and assumes its 0.
What you should have done was to report it on your tax return, schedule D, and then you would actually be able to deduct the $15 loss from your other income.
You can still do that by filing an amended return, but if you're under audit for the issue - you should probably have a professional help you.