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!
23 comments


Liam Mendez
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
Emily Jackson
•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
Liam Mendez
•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
Sophia Nguyen
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
Jacob Smithson
•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
Isabella Brown
•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
Sophia Nguyen
•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
Isabella Brown
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
Maya Patel
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
Aiden Rodríguez
•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
Emma Garcia
•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
Maya Patel
•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
Emma Garcia
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
Ava Kim
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
Emily Jackson
•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
Ava Kim
•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
Ethan Anderson
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
Layla Mendes
•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
Liam Fitzgerald
•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
Liv Park
Great question! The explanation about purchase commissions being added to cost basis and selling commissions reducing proceeds is spot on. Just wanted to add a couple of practical tips from my experience: 1) If you use multiple brokers, make sure you're consistent in how you handle fees across all platforms. Some brokers are better at clearly showing commissions on their 1099-B forms than others. 2) Don't forget about transfer fees if you moved stocks between brokers - these can usually be added to your cost basis as well since they're directly related to acquiring the securities. 3) Keep digital copies of all your trade confirmations, not just the year-end summaries. The IRS loves documentation if they ever have questions about your cost basis calculations. One last thing - if you're doing a lot of trading, consider whether you might qualify as a "trader in securities" for tax purposes. The rules are different and might actually be more favorable depending on your situation. Worth researching if you're making frequent trades!
0 coins
Lucy Taylor
•This is really helpful, especially the tip about transfer fees! I hadn't thought about those being added to cost basis. I actually transferred some positions from Robinhood to Fidelity last year and paid a $75 ACAT fee. So if I understand correctly, that $75 would get added to the cost basis of those transferred shares? Also, you mentioned "trader in securities" status - what's the threshold for that? I made about 200 trades last year but I have a day job, so I'm not sure if that would qualify me or if it would even be beneficial.
0 coins
Zadie Patel
•Yes, exactly! That $75 ACAT transfer fee would be added to the cost basis of the transferred shares. The IRS treats transfer fees as part of your acquisition costs since they're necessary expenses to obtain the securities. Regarding trader status, it's not just about number of trades - the IRS looks at four main factors: 1) frequency and regularity of trades, 2) whether trading is your primary income source, 3) time devoted to trading, and 4) whether you're seeking short-term profits. Since you have a day job, you'd probably be classified as an investor rather than a trader, which is actually fine - most people don't benefit from trader status anyway because you lose the ability to claim capital gains treatment (everything becomes ordinary income/loss). With 200 trades and a day job, you're likely better off staying with investor status and just making sure you're properly tracking all those commission adjustments!
0 coins
Ashley Simian
This is such a common source of confusion! I went through the same thing when I started actively trading. One additional point that might help - if you're using a discount broker that charges per-share fees instead of flat commissions (like some do for penny stocks), those per-share fees work the same way. They get added to your cost basis on purchases and subtracted from proceeds on sales. Also, if you ever get into options trading, the same principle applies to options commissions and assignment/exercise fees. The key is always thinking about which side of the transaction the fee relates to - acquisition costs increase your basis, disposition costs reduce your proceeds. Keep good records throughout the year rather than trying to reconstruct everything at tax time. I learned that lesson the hard way my first year of serious trading!
0 coins