Back to IRS

Emily Jackson

How to properly handle brokerage fees in stock cost basis calculations for tax reporting

Hey tax folks, I'm trying to figure out the right way to report my stock transactions for taxes. I understand that when I buy a stock, I can add the purchase commission to my cost basis. Like if I bought shares for $2,500 and paid a $19.95 commission, my actual cost basis would be $2,519.95. But I'm confused about what happens when I sell. Let's say I sell those same shares for $3,000 but pay another $19.95 commission on the sale. Can I somehow add that selling commission to my cost basis too (making it $2,539.90), or does that selling commission get subtracted from my sale proceeds instead? This is my first year with significant trading and I want to make sure I'm calculating my capital gains correctly. Any clarification would be super helpful!

The selling commission doesn't get added to your cost basis, but it does reduce your sale proceeds. So in your example: Purchase price: $2,500 Purchase commission: $19.95 Cost basis: $2,519.95 Sale price: $3,000 Sale commission: $19.95 Net proceeds: $2,980.05 Your capital gain would be $2,980.05 - $2,519.95 = $460.10 This way, both commissions are accounted for in determining your actual gain. The IRS allows this because these are necessary expenses of the transactions. Make sure you're keeping good records of all these fees, especially if you use a broker that doesn't clearly identify them on your 1099-B.

0 coins

Thanks for explaining! So I've been thinking about it wrong the whole time. If I follow your example, I'm essentially: 1) Adding purchase commission to cost basis 2) Subtracting selling commission from proceeds Does this also apply to other fees my broker charges? I sometimes see regulatory fees or exchange fees on my statements.

0 coins

Yes, you've got it exactly right! You add purchase fees to your cost basis and subtract selling fees from your proceeds. Regarding those other small fees like regulatory fees or exchange fees, those can generally be treated the same way as commissions. So regulatory fees paid when purchasing would be added to your cost basis, and those paid when selling would reduce your proceeds. The key is that they must be necessary expenses directly connected to the specific transactions.

0 coins

After struggling with the same cost basis questions last year, I found this amazing AI tool that analyzes all your trading records and automatically calculates the proper cost basis adjustments for commissions and fees. Saved me literally hours of spreadsheet work! Check out https://taxr.ai - you just upload your trading statements and it identifies all those fees that should be factored into your cost basis or sale proceeds. It even flags wash sales and other tax issues you might miss.

0 coins

Does it work with statements from Robinhood and Fidelity? I have accounts at both and honestly, Robinhood doesn't make it easy to see the fees they're embedding.

0 coins

Sounds interesting but I'm skeptical. How does it handle FIFO vs specific identification methods for multiple purchases of the same stock? I'm dealing with partial sales of positions I built over time and it's a nightmare to track.

0 coins

It works perfectly with both Robinhood and Fidelity! I had the same issue with Robinhood's hidden fees, but the tool extracted them correctly. It actually helped me discover some payment-for-order-flow adjustments I would have missed. For FIFO vs specific identification, it actually gives you the option to choose your method and will recalculate everything based on your selection. You can even model different scenarios to see which method gives you the best tax outcome. It's super helpful for those partial sales of positions built over time - that's exactly what I was dealing with too.

0 coins

Just wanted to update about that taxr.ai site that was mentioned. I was skeptical but decided to try it with my complex situation (multiple buys of the same stock over years with partial sells). It actually worked amazingly well - identified all the embedded fees my broker hadn't clearly broken out and properly adjusted both my cost basis and sale proceeds. Found about $780 in deductible fees I would have missed. The specific identification feature saved me from a significant tax bill by optimizing which lots to sell. Really impressive if you're dealing with lots of transactions.

0 coins

If you're having trouble getting your cost basis questions answered, try calling the IRS directly! I know, sounds impossible right? I spent DAYS trying to get through to someone who could help with my cost basis questions for some inherited stocks. Then I found Claimyr (https://claimyr.com) which got me connected to an actual IRS agent in about 15 minutes! They have this demo video showing how it works: https://youtu.be/_kiP6q8DX5c The agent I spoke with confirmed exactly how to handle those brokerage fees AND helped me with the stepped-up basis rules for my inherited shares. Way better than guessing or spending hours on hold.

0 coins

Wait, how does that even work? The IRS phone system is notoriously awful. Is this just paying someone to wait on hold for you or something?

0 coins

Yeah right. I'll believe this when I see it. I've literally spent HOURS on hold with the IRS and still got disconnected. No way they're getting anyone through in 15 minutes unless they have some secret backdoor number that regular people don't have access to.

0 coins

It essentially uses technology to navigate the IRS phone system more efficiently than a regular caller could. It's not a secret backdoor - they're calling the same numbers we all have access to, but their system monitors wait times across different IRS departments and knows exactly when to call to minimize wait time. No, it's not just paying someone to wait on hold. It's a system that secures your place in line and then calls you when an agent is about to be available. I was skeptical too, but it worked exactly as advertised - I got connected to someone in the capital gains department who knew exactly how to handle my cost basis questions.

0 coins

I have to eat my words about that Claimyr thing. After posting my skeptical comment, I decided to try it anyway because I was desperate to get my cost basis questions answered before filing deadline. I honestly couldn't believe it worked. Got connected to an IRS agent in about 20 minutes (not quite the 15 they advertised but still WAYYY better than my previous attempts). The agent confirmed everything about handling brokerage fees and even helped clarify some wash sale issues I had. Worth every penny just for the time saved not being on hold for hours.

0 coins

Handy tip: If you're dealing with a lot of trades, most tax software has options to import your 1099-B directly from your broker. TurboTax, H&R Block, and TaxAct all have this feature. Saves a ton of time and usually gets those commission calculations right automatically.

0 coins

I tried that with TurboTax but had issues because my broker (smaller regional one) isn't on their direct import list. Do you know if there's a way to format an Excel file in a way these tax programs can read for multiple transactions?

0 coins

Yes! Most tax software can import a CSV file with your transactions. You'll need to format it with specific columns though. For TurboTax, they have a template you can download from their import screen - look for "Import from Excel/CSV" option when you get to the investment income section. H&R Block and TaxAct have similar features. The key fields you'll need are usually: security name, purchase date, cost basis, sale date, sale proceeds, and whether it's short-term or long-term. Make sure your commission amounts are already factored into your cost basis and proceeds as we discussed above before importing.

0 coins

Just FYI, the rules are a little different for cryptocurrency trades if anyone is also dealing with those. The IRS has specific guidance on how to handle fees for crypto transactions.

0 coins

Could you share more about the crypto fee rules? I started mining and trading last year and have no idea how to handle all the gas fees and exchange fees.

0 coins

For crypto, the basic principle is similar to stocks but there are some key differences. Gas fees and exchange fees when buying crypto get added to your cost basis, and fees when selling reduce your proceeds - just like with stock commissions. But here's where it gets tricky: mining rewards are taxable income at fair market value when received, and any fees you paid to mine (like pool fees) are deductible business expenses. Also, if you're doing DeFi transactions, each swap/trade is a taxable event even if you never convert back to USD. The IRS has been pretty clear that every crypto transaction needs to be reported. I'd recommend keeping detailed records of all your transactions including gas fees, exchange fees, and mining pool fees. There are some crypto tax software options like Koinly or CoinTracker that can help parse through all those transactions if you have a lot of them.

0 coins

IRS AI

Expert Assistant
Secure