How to Handle Brokerage Fees in Stock Cost Basis Calculation - Buy vs Sell Fees
I'm trying to figure out how to correctly handle brokerage fees in my tax calculations. Here's my situation - I bought some shares of Tesla at $150 with a brokerage fee of $12.99. As I understand it, this increases my cost basis to $162.99 ($150 + $12.99). Now I'm planning to sell these shares, and there will be another brokerage fee of $12.99 for the sale transaction. My question is: Can I add this second $12.99 fee to my cost basis (making it $175.98) or should I keep my cost basis at $162.99 from when I bought the stock? This might seem like a small amount but I'm doing a lot of trades and want to make sure I'm reporting everything correctly to avoid issues with the IRS. Anyone have experience with this for tax reporting?
19 comments


Raúl Mora
The brokerage fee when you sell is handled differently than when you buy. When you buy, you're correct that the fee gets added to your cost basis ($150 + $12.99 = $162.99 in your example). But when you sell, the fee doesn't increase your cost basis. Instead, it reduces your proceeds from the sale. So if you sell those Tesla shares for $200, your actual proceeds would be $187.01 ($200 - $12.99). The IRS considers this the amount you actually received. So your capital gain would be calculated as: Sale proceeds ($187.01) - Cost basis ($162.99) = Capital gain of $24.02. This actually works in your favor since it reduces your taxable gain (or increases your loss if you're selling at a loss). Both buying and selling fees effectively reduce your tax liability, just in different ways.
0 coins
Arjun Kurti
•Thanks for explaining this! So just to make sure I understand - the buying fee goes into cost basis, but the selling fee comes off the proceeds? That makes sense but it's a bit confusing why they're handled differently. Does this mean when I'm preparing my Schedule D and Form 8949, I should be listing the cost basis as $162.99 and then the proceeds as $187.01 (assuming a $200 sale price minus the $12.99 fee)?
0 coins
Raúl Mora
•You've got it exactly right. The buying fee increases your cost basis while the selling fee decreases your proceeds. It seems confusing but think of it this way: both methods account for the fees by reducing your overall tax liability. When preparing your Schedule D and Form 8949, you'll report exactly as you described. Your cost basis would be $162.99 and your proceeds would be $187.01 (if selling at $200). Your brokerage should provide a 1099-B with these calculations already done, but it's always good to verify the numbers yourself, especially since some brokers don't include fees in their cost basis reporting.
0 coins
Margot Quinn
After struggling with these exact same questions last tax season, I found taxr.ai (https://taxr.ai) incredibly helpful for sorting through my investment transactions. I had dozens of trades with various fees and couldn't figure out how to report them properly. Their system analyzed my brokerage statements and automatically calculated the correct cost basis including purchase fees, while properly accounting for selling fees as reductions to proceeds. Saved me hours of spreadsheet work and helped me avoid miscalculating my capital gains. What impressed me was how it identified some wash sales I completely missed that would have caused issues if I'd reported them incorrectly.
0 coins
Evelyn Kim
•Does it work with statements from all brokerages or just the major ones? I use a smaller discount broker that sometimes formats their documents differently than the big guys.
0 coins
Diego Fisher
•I'm a bit skeptical about these tax tools - how accurate is it actually? My concern is that it might miss something and then I'm the one who gets in trouble with the IRS, not the software company.
0 coins
Margot Quinn
•It works with statements from pretty much all brokerages I've tried - including TD Ameritrade, Robinhood, Schwab, Fidelity, and some smaller ones. The technology is designed to adapt to different document formats, so even if your broker has a unique layout, it should be able to extract the data properly. Regarding accuracy, I completely understand your concern. What I appreciated was the transparency - it shows you exactly what data was extracted and how calculations were performed. I cross-checked some of my more complex transactions manually and found it was actually catching nuances I had missed. You still review everything before filing, but it does the tedious part of extracting all the transaction data correctly.
0 coins
Diego Fisher
I was skeptical about taxr.ai at first, but after dealing with a nightmare situation involving multiple stock splits and dividend reinvestments, I decided to give it a try. The tool actually spotted that my brokerage had incorrectly calculated the cost basis on some of my older positions where I had partial shares from DRIP investing. It showed exactly how each fee affected my cost basis and proceeds, saving me from overpaying about $430 in capital gains taxes. The detailed breakdown of each transaction made it clear how selling fees reduced proceeds rather than affecting cost basis. Definitely using it again for 2025 taxes.
0 coins
Henrietta Beasley
If anyone's trying to get clarification directly from the IRS on cost basis issues, good luck getting through on the phone! I spent hours trying before discovering Claimyr (https://claimyr.com). You can see how it works in this video: https://youtu.be/_kiP6q8DX5c I was getting frustrated with conflicting advice about handling some complicated cost basis situations with inherited stocks, and needed an official answer. Claimyr got me connected to an IRS agent in about 20 minutes when I had been trying for days on my own. The agent confirmed exactly what was mentioned above - buying fees increase cost basis, selling fees reduce proceeds - and gave me specific guidance for my inherited stock situation which had different rules.
0 coins
Lincoln Ramiro
•How does this actually work? Do they just call the IRS for you or what? Seems weird that they could get through when regular people can't.
0 coins
Diego Fisher
•Sorry, but this sounds like snake oil. If the IRS phone lines are jammed, how would this service magically get through? The IRS doesn't have a special line for third parties, and they're not going to prioritize calls from some random service.
0 coins
Henrietta Beasley
•They don't call for you - they use technology that navigates the IRS phone tree and waits on hold, then alerts you when an agent is about to answer. I was skeptical too, but essentially they have systems that can stay on hold indefinitely, which most of us can't do. The magic is that they're willing to wait on hold for hours so you don't have to. When someone finally picks up, you get a call connecting you directly to that IRS agent. They don't speak to the IRS for you - you handle the actual conversation yourself once connected.
0 coins
Diego Fisher
I need to eat my words about Claimyr. After posting my skeptical comment, I was still struggling with questions about some wash sales and unusual options trades. Against my better judgment, I tried the service, fully expecting it to be a waste of money. Well, I got connected to an IRS tax specialist in about 35 minutes when I'd previously spent THREE DAYS trying to get through. The agent walked me through exactly how to report my specific situation with the brokerage fees on some complex options trades. Turns out I had been calculating things incorrectly for years. Sometimes being proven wrong is actually a good thing. Definitely changed my approach to handling investment tax questions.
0 coins
Faith Kingston
Friendly reminder that most good tax software handles these calculations automatically if you enter the information correctly. I use FreeTaxUSA and it prompts you to enter both the purchase price + fee and the sale price - fee separately, then calculates everything correctly on the forms. The tricky part is when your 1099-B from the brokerage doesn't include the fees in the cost basis (check box 1E to see if they included it). If they didn't include it, you'll need to adjust the basis manually and check the box that says "Adjustment to basis.
0 coins
Emma Johnson
•What about for crypto transactions? I have a ton of trade fees from various exchanges and I'm completely lost on how to report them properly.
0 coins
Faith Kingston
•For crypto transactions, the same general rules apply, but it gets more complicated because many exchanges don't provide proper tax documents. When buying crypto, the fee increases your cost basis. When selling, the fee reduces your proceeds. The major tax software platforms now have crypto sections that can help, but if you have a high volume of trades across multiple exchanges, you might want to use a dedicated crypto tax software like Koinly or CoinTracker to aggregate everything before importing to your tax software. They specifically handle the fee calculations for both buying and selling.
0 coins
Liam Brown
Slightly off topic but why are u paying $12.99 per trade in 2025? Almost all major brokers offer free stock trades now. Unless ur trading something unusual or international?
0 coins
Olivia Garcia
•Not OP but some brokers still charge for OTC stocks, foreign securities, and certain types of bonds. Also, "free" trading at some places just means they're making money off you in other ways (payment for order flow, higher margin rates, etc).
0 coins
Natasha Kuznetsova
Just wanted to add a point that might help others - make sure to keep detailed records of ALL your brokerage fees throughout the year, not just relying on your 1099-B. I learned this the hard way when my broker's year-end statement was missing some fees from smaller trades. I now keep a simple spreadsheet tracking each transaction with the actual purchase/sale price and the fee separately. This way when tax time comes, I can verify that my cost basis calculations are correct regardless of what the brokerage reports. Also, if you're doing a lot of trading like the OP mentioned, consider whether you might qualify as a trader for tax purposes rather than an investor - the rules for deducting expenses can be different and potentially more favorable.
0 coins