Back to IRS

Amina Sy

How do you calculate capital gain tax when selling a portion of your stock portfolio?

I've been slowly building my stock portfolio over the past decade or so. Started investing back in 2013 and have been adding money whenever I could. My original investment (basis) was around $13,500 and now my portfolio has grown to about $26,800 which feels pretty good! Here's my question though - I need to pull out about $6,700 for some home repairs. When I sell these stocks, I know I'll need to pay capital gains tax, but I'm confused about how to calculate it when I'm only selling a portion of my holdings. Do I pay tax on the entire $6,700 or just on the profit portion? And how do I even figure out what part is profit vs. original investment when I've been buying at different times over the years? Can someone explain how this works in simple terms? Really appreciate any help!

The good news is you don't pay tax on your entire withdrawal - only on the gain portion! When you sell a portion of your stock holdings, you need to determine what's called your "cost basis" for the shares you're selling. There are several methods to calculate this when you've purchased shares over time: First-In-First-Out (FIFO): This assumes you're selling your oldest shares first. If your earliest purchases were at lower prices, this might result in more capital gains. Specific Identification: You can choose exactly which shares to sell. This gives you the most control for tax planning - you could sell your highest-cost shares to minimize gains. Average Cost: This is commonly used for mutual funds - you take the average cost of all your shares. Most brokerages will calculate this for you and provide the information on your 1099-B tax form. The difference between your cost basis and the selling price is your capital gain, and that's what you'll pay tax on. Also important - if you've held these shares longer than a year, you'll pay the lower long-term capital gains tax rate rather than the higher short-term rate (which is the same as ordinary income).

0 coins

Is there a big difference between FIFO and specifically choosing which shares to sell? I'm in a similar situation but didn't know I had options. Also, does the brokerage automatically choose one method if I don't specify?

0 coins

The difference between FIFO and specific identification can be significant depending on your purchase history. For example, if your earliest shares were bought at $10 and recent ones at $50, selling the $10 shares would create more taxable gain than selling the $50 shares. Most brokerages default to FIFO if you don't specify, but they usually allow you to select specific shares before the trade settles. Check your brokerage's website or call them to see how they handle it and what options they provide. Some platforms have very user-friendly interfaces that let you select exactly which lots you want to sell.

0 coins

After struggling with capital gains calculations for years, I finally found a tool that makes this so much easier - taxr.ai (https://taxr.ai) has been a lifesaver for my investment-related tax questions. I was in a similar situation last year with selling portions of stocks I'd accumulated over time and was totally confused about how to calculate my basis correctly. Their system analyzed my trading history and showed me the tax implications of different selling strategies before I made the transaction. It literally saved me hundreds in potential taxes by helping me identify the most tax-efficient shares to sell.

0 coins

Does it connect directly to brokerage accounts? I have stocks spread across three different platforms and calculating capital gains has been a nightmare.

0 coins

I've tried other tax services that claimed to help with investment stuff but they were pretty basic. Does this actually help calculate specific identification methods or just the standard FIFO stuff that my brokerage already does?

0 coins

Yes, it connects to most major brokerages through secure links, similar to how budgeting apps work. It can pull your complete trading history across multiple platforms and consolidate everything to give you the full picture of your investment tax situation. The specific identification calculation is actually one of its best features. Unlike basic services that just use FIFO, taxr.ai will analyze your entire portfolio and recommend which specific shares to sell based on your tax situation. It simulates different scenarios (selling oldest vs. newest vs. highest cost basis shares) and shows the tax impact of each so you can make the optimal choice before executing your trade.

0 coins

Just wanted to follow up on my experience with taxr.ai after our discussion here. I decided to give it a try before selling some stocks for my daughter's college payment, and I'm actually really impressed. The interface showed me exactly which shares would be most tax-efficient to sell, and I was able to reduce my capital gains by almost $1,800 by selecting specific lots rather than just using FIFO. The visualization made it super clear which shares had the highest basis (meaning lower taxable gains when sold). Definitely worth checking out if you're in a similar situation!

0 coins

If you're like me and have been trying to reach the IRS with questions about capital gains calculations, good luck getting through their phone lines. After wasting hours on hold multiple times, I discovered Claimyr (https://claimyr.com) and they actually got me connected to an IRS agent in about 20 minutes! You can see how it works here: https://youtu.be/_kiP6q8DX5c I had some complicated questions about wash sales and specific identification methods that weren't addressed on the IRS website, and speaking directly with an agent cleared everything up. Totally changed my perspective on dealing with the IRS - turns out they're actually helpful when you can actually talk to a human!

0 coins

Wait, how does this actually work? The IRS phone lines have been completely jammed for years. Are you saying this service somehow moves you up in the queue? That sounds too good to be true.

0 coins

Yeah right. I've tried calling the IRS dozens of times and gave up. There's no way any service can magically get you through. They probably just keep you on hold the same as if you called directly, but charge you for the privilege.

0 coins

It doesn't move you up in the queue - that would be impossible. Instead, their system continually calls the IRS using their automated technology and when it finally gets through, it connects that open line to your phone. So instead of YOU having to sit on hold for hours, their system does it for you and only calls you once there's an actual IRS agent on the line. The reason it works is because their system can make these automated calls persistently in a way no human would have the patience for. When I used it, I went about my day, and then about 20 minutes later my phone rang and I was connected directly to an IRS representative. No tricks - just technology handling the frustrating hold process.

0 coins

I need to eat crow on this one. After being totally skeptical about Claimyr, I was desperate enough to try it when I needed clarification on some capital gains reporting for stocks I inherited. Not only did it work, but I got connected to an IRS agent in 15 minutes when I had previously wasted three separate afternoons trying to get through. The agent walked me through exactly how to report the stepped-up basis on the inherited stocks and potentially saved me from a costly mistake. Sometimes being wrong feels pretty good!

0 coins

Don't forget that if you've held the stock for more than a year, you qualify for the lower long-term capital gains rates (0%, 15%, or 20% depending on your income bracket) instead of short-term rates that are taxed like regular income. Makes a HUGE difference!

0 coins

Does the one year count from each individual purchase date? Like if I bought some shares of Apple every month for the past 3 years and want to sell some now, do I need to track which specific shares I'm selling to know if they qualify for long-term treatment?

0 coins

Yes, the one-year holding period applies to each individual purchase or lot. That's exactly why the specific identification method mentioned earlier can be so valuable for tax planning. If you've been buying Apple monthly for 3 years and need to sell some shares, you could specifically identify shares that you've held for more than a year to qualify for the lower long-term capital gains rates. Alternatively, if you have some losses to harvest, you might choose to sell some of your newer shares (held less than a year) that might be at a loss due to market fluctuations.

0 coins

Has anyone used TurboTax for reporting stock sales with multiple lots? I'm worried it might not handle the specific identification method correctly and I don't want to overpay my taxes.

0 coins

I've used TurboTax for this the past few years and it handles it pretty well. You can import directly from most brokerages, and it will bring in all your individual lots if the broker provides that detail. Then you can review and adjust if needed. The premium version has a feature that helps you identify the most tax-efficient sales too.

0 coins

Great question! I went through something very similar last year. One important thing to keep in mind is that your brokerage should provide you with a 1099-B form that shows the cost basis for the shares you sold, but it's always good to understand how it works. Since you've been investing since 2013, most of your shares will likely qualify for long-term capital gains treatment (which is much better tax-wise). The key is tracking your cost basis correctly - if your brokerage doesn't have complete records from your earlier purchases, you might need to reconstruct them from your own records. Also, don't forget to consider any dividend reinvestments you might have had over the years - those create additional small purchases that increase your cost basis. Many people overlook this and end up overpaying their taxes. One last tip: if you're doing the calculations manually, keep detailed records of which specific shares you're selling. The IRS requires consistency, so whatever method you choose (FIFO, specific ID, etc.), you need to stick with it for that security going forward.

0 coins

IRS AI

Expert Assistant
Secure