< Back to IRS

LunarEclipse

Understanding FIFO / FILO on stocks for tax reporting - which method is better?

So I started investing in stocks about 3 years ago, pretty casually at first - just bought some index funds and a few blue chips and basically ignored them. But since last summer I've been much more active with my portfolio (I blame those investment podcasts lol). I'm buying and selling way more frequently and now I'm realizing I have no clue about the tax implications. I keep hearing about FIFO and FILO methods for calculating gains/losses when you sell partial positions. From what I understand, FIFO means you sell your oldest shares first, and FILO means you sell your newest shares first? But I have no idea which one I should be using or if I even have a choice. For example, I bought 50 shares of XYZ Corp at $75 last year, then another 50 at $120 six months ago. Now the price is $100 and I sold 60 shares last week. How do I figure out my capital gains? Does my broker automatically use a certain method? I use Fidelity if that matters. Also, can I switch between methods for different stocks or am I locked into one approach for my whole portfolio? Any help appreciated, I'm trying to be smarter about this before tax season hits me with surprises.

Great question about FIFO vs FILO (more commonly called LIFO) for stock sales! This is something many active investors overlook until tax time. For tax purposes, FIFO (First In, First Out) means exactly what you thought - when you sell shares, the IRS assumes you're selling your oldest shares first. LIFO (Last In, First Out) or FILO as you called it means selling your newest shares first. There's also specific identification where you can choose exactly which shares to sell. In your XYZ example: Using FIFO, you'd be selling all 50 of your oldest shares ($75) plus 10 of your newer shares ($120). So your gain/loss would be: 50 shares × ($100-$75) + 10 shares × ($100-$120) = $1,250 gain - $200 loss = $1,050 total gain. Most brokers default to FIFO unless you specifically direct otherwise, including Fidelity. You generally need to specify which lots you want to sell at the time of the transaction. You can use different methods for different stocks, but you need to specify this at the time of sale, not after the fact.

0 coins

Thanks for the clear explanation. Does this mean if I don't specify anything when selling, the IRS automatically assumes I'm using FIFO? Also, is there any advantage to using LIFO instead? Like would it be better for minimizing taxes in some situations?

0 coins

Yes, if you don't specify anything when selling, both your broker and the IRS will default to FIFO. This is why it's important to plan your sales if tax management is important to you. There can definitely be advantages to using different methods depending on your situation. LIFO can be beneficial if your newer purchases are at higher prices and you want to realize losses to offset other gains. Specific identification gives you the most control - you can strategically select which lots to sell based on your overall tax situation. For example, you might want to realize long-term gains (held >1 year) instead of short-term gains that are taxed at higher rates, or harvest specific losses to offset gains elsewhere.

0 coins

I've been using https://taxr.ai for managing my investment tax stuff and it's been a game changer for exactly this kind of situation. I was super confused about lot selection and cost basis when I started trading more actively last year. I uploaded my Fidelity statements and it showed me the tax implications of different selling strategies before I made trades. Apparently I'd been doing it all wrong and probably overpaid thousands in taxes. The tool actually explains which lots would be best to sell based on your overall tax situation and helps track everything for tax time. It also showed me how to do tax-loss harvesting properly by identifying which specific shares to sell. Seriously made the whole FIFO/LIFO decision much clearer with actual numbers from my portfolio.

0 coins

Does taxr.ai connect directly to brokerages like Fidelity? I'm using three different platforms (got carried away lol) and the thought of manually entering everything makes me want to cry.

0 coins

I'm skeptical about these tax tools. Does it actually help with the form filing or just gives advice? I've had bad experiences with other tax software completely missing things when I had investment income.

0 coins

It doesn't connect directly to brokerages yet, but you can upload your statements or transactions CSV and it imports everything automatically. I was in the same boat with multiple accounts and it handled that just fine - saves so much time compared to manual entry. The tool does both - gives strategic advice about which lots to sell and also helps with the actual tax forms. It generates the full Schedule D and all the necessary forms for reporting investment income. What impressed me most was how it caught several wash sales I had no idea about that my previous tax software completely missed.

0 coins

Just wanted to update that I tried taxr.ai after seeing the recommendation here. Honestly mind blown at how much easier this makes things! I uploaded my statements from all three brokerages and it immediately identified several places where I could have saved on taxes with better lot selection. I was basically throwing money away by not paying attention to FIFO vs specific identification. The interface is super straightforward and actually EXPLAINS things rather than just giving numbers. I'm not a tax expert by any means, but now I feel like I can make smarter selling decisions. Already saved about $1,200 in taxes by identifying some lots I should sell now for tax-loss harvesting. Wish I'd known about this earlier!

0 coins

If you're running into trouble getting answers from your broker about tax lot methods, I highly recommend using https://claimyr.com to get through to a real person at Fidelity. I spent HOURS trying to get clear answers about changing my default cost basis method and kept getting stuck in their automated system. Finally tried Claimyr after a friend suggested it, and they got me connected to a Fidelity investment specialist in about 10 minutes. The specialist walked me through the exact process for selecting specific lots when selling and even helped me retroactively adjust some recent sales where I should have used specific identification instead of FIFO. You can see how it works here: https://youtu.be/_kiP6q8DX5c Turns out Fidelity actually has pretty flexible options but it's buried in their system and the regular customer service people don't always know the details.

0 coins

Wait you can retroactively change the lot selection method after selling? I thought once the trade was executed that was it. How far back can you go to make these adjustments?

0 coins

This sounds like a paid service just to talk to customer service? That's ridiculous, why would anyone pay for something that should be free? I'm sure if you just stay on hold long enough you'll eventually get through.

0 coins

You can typically make adjustments until the settlement date of the trade (T+2 for most securities). So you have a small window, not indefinitely. In some cases with proper documentation, brokers might allow adjustments for a bit longer, but it's entirely at their discretion. I completely understand the skepticism about paying to reach customer service. I felt the same way initially! But after spending literally 4+ hours across multiple days trying to get through and being disconnected repeatedly, the time savings alone was worth it. It's not just about waiting on hold - it's about navigating the maze of automated systems that seem designed to prevent you from reaching a specialized representative who can actually help with cost basis questions.

0 coins

Well I stand corrected about Claimyr. After my skeptical comment I spent 2.5 hours today trying to reach someone at Fidelity who could explain my cost basis options. Got transferred three times and then disconnected. Finally broke down and tried the service and got through to someone who actually knew what they were talking about in less than 15 minutes. The Fidelity rep explained that I had been using default FIFO for everything but could use their "lot relief method" tool to specify exactly which shares I want to sell. Also learned they have a tax lot optimizer that I never knew existed because it's not prominently displayed in their interface. Definitely saved me a lot of headache for future trades.

0 coins

Something nobody mentioned yet - SpecID (specific identification) is actually better than both FIFO and LIFO in most cases. You can cherry-pick exactly which shares to sell to optimize your tax situation. For example, if you have some shares at a loss and some at a gain, you can selectively sell the losers to harvest tax losses. Or if you're trying to qualify for long-term capital gains rates, you can specifically sell shares you've held over a year. Just make sure you specify BEFORE the trade executes. Most brokers make you select the tax lots during the order process now.

0 coins

This is what I've been trying to do but I'm confused about one thing - do you have to specify the exact purchase date for each lot? I have like 20 different purchase dates for some stocks I've been DCAing into for years. Seems super tedious.

0 coins

You don't always need to specify the exact purchase date, though having that info helps. What you really need is the cost basis for each lot and whether it's long or short term. Most broker interfaces will show you a list of all your lots with their purchase dates and costs when you go to sell. It can be tedious if you have lots of small purchases, but the tax savings can be substantial. Some brokers have tools that let you filter lots by criteria (like "sell all lots with losses" or "sell oldest shares first"). Also, once you get in the habit of doing this with each trade, it becomes pretty quick. The tax optimization is definitely worth the extra minute or two per trade.

0 coins

Just wanna point out - FILO isn't actually the right term. It's LIFO (Last In, First Out). FILO would be First In, Last Out which is just another way of saying LIFO. But everyone in accounting and tax uses LIFO. Also be aware that wash sale rules can mess up your clever tax planning if you're not careful. If you sell at a loss and buy substantially identical securities within 30 days before or after, you can't claim the loss.

0 coins

You're right, I got the terminology mixed up! I've been reading so many different articles and they must have been using different terms. LIFO makes more sense anyway (Last In, First Out). That wash sale rule is definitely something I need to watch out for. I've definitely been guilty of selling something and then buying it back a week later when the price drops more. Didn't realize that could affect my tax situation.

0 coins

The wash sale rule is the WORST when you're actively trading. I got completely burned last year when I didn't realize my IRA purchase triggered a wash sale on a loss I took in my regular account. Such a headache.

0 coins

This is such a timely discussion! I've been struggling with the same issues since I started more active trading this year. One thing I learned the hard way is that you really need to think about your overall tax strategy, not just individual trades. I initially just used whatever my broker defaulted to (FIFO), but after talking to my CPA, I realized I was missing opportunities. Now I try to look at my entire portfolio at year-end and see if there are strategic moves I can make. Sometimes it makes sense to realize some losses to offset gains, or vice versa. Also want to echo what others said about keeping good records. Even with all these fancy tools and broker statements, I started keeping my own spreadsheet tracking purchase dates, amounts, and my reasoning for each sale method I chose. Makes tax prep so much easier and helps me learn from past decisions. The wash sale rule mentioned above is definitely a trap - I almost fell into it myself when I panic-sold during a market dip and then bought back in too quickly.

0 coins

This is exactly the kind of holistic approach I wish I'd taken from the beginning! I've been so focused on individual trades that I never thought about the bigger picture strategy. Your point about year-end portfolio review is really smart - I bet there are tons of optimization opportunities I'm missing by not looking at everything together. The spreadsheet idea is brilliant too. I've been relying entirely on my broker's records, but having my own tracking system would definitely help me understand patterns and make better decisions. Did you include anything specific in your spreadsheet beyond purchase dates and amounts? Like maybe notes about market conditions or your reasoning at the time? And yeah, that wash sale trap is so easy to fall into, especially when you're emotionally reacting to market moves. Thanks for sharing your experience - it's really helpful to hear from someone who's been through this learning curve!

0 coins

One thing that hasn't been mentioned yet is how important it is to understand the holding period rules for long-term vs short-term capital gains. This can be just as crucial as choosing the right cost basis method. If you hold securities for more than one year, you qualify for long-term capital gains treatment, which has much more favorable tax rates (0%, 15%, or 20% depending on your income) compared to short-term gains that are taxed as ordinary income. So when you're doing specific identification, you want to consider not just the cost basis but also the holding period. Sometimes it might make sense to sell shares at a slightly higher gain if they qualify for long-term treatment, rather than selling newer shares at a lower gain that would be taxed as short-term. For example, if you bought shares 13 months ago at $80 and shares 6 months ago at $90, and the current price is $100, you might choose to sell the older shares even though the gain is larger ($20 vs $10) because that $20 gain gets the preferential long-term rate while the $10 gain would be taxed at your ordinary income rate. Your broker should show you the holding period for each lot when you're selecting which shares to sell. This is another reason why specific identification usually beats both FIFO and LIFO - you get to optimize for both cost basis AND tax treatment.

0 coins

This is such a great point about the holding period rules! I've been so focused on the cost basis calculations that I completely overlooked how the timing affects the tax rates. The example you gave really makes it clear - sometimes taking a bigger gain can actually result in less tax if it qualifies for long-term treatment. I'm curious though - is there an easy way to track this when you're making frequent purchases of the same stock? Like if I'm dollar-cost averaging into an index fund every month, how do I keep track of which lots are approaching the one-year mark so I can plan sales strategically? Does your broker usually make this obvious in their interface, or do you need to track it separately? Also, do the wash sale rules interact with the holding period at all? Like if I sell shares for a loss and then rebuy within 30 days, does that affect when the new shares would qualify for long-term treatment?

0 coins

Great questions! Most modern broker interfaces do show holding periods pretty clearly - they'll usually have columns showing purchase date, days held, and whether each lot qualifies as long-term or short-term. At Fidelity, when you go to sell, it shows "ST" or "LT" next to each lot which makes it easy to see at a glance. For tracking frequent purchases like DCA into index funds, I actually set calendar reminders for about 11 months after each purchase so I know when lots are approaching long-term status. Some people use apps or spreadsheets, but the calendar approach works well for me since I can plan potential sales around those dates. Regarding wash sales and holding periods - yes, they do interact! If you trigger a wash sale, the holding period of the shares you sold gets added to the holding period of the replacement shares. So if you sell shares you held for 10 months at a loss and rebuy within 30 days, your new shares start their holding period clock with those 10 months already counted. It's actually one of the few beneficial aspects of the wash sale rule - you don't lose progress toward long-term status. This is another reason why good record keeping becomes crucial when you're actively trading the same securities frequently.

0 coins

This whole thread has been incredibly helpful! I'm in a similar situation to the original poster - started casual investing a few years ago and now I'm much more active. One thing I want to add that might help other newcomers is about the psychological aspect of all this tax optimization. When I first learned about specific identification and started trying to optimize every single trade, I got so caught up in the tax implications that I was making poor investment decisions. I'd hold onto losing positions longer than I should have just because I wanted to hit the one-year mark for long-term gains, or I'd sell winners too early to harvest losses. My advice is to start simple - maybe just focus on understanding FIFO vs specific identification first, then gradually add complexity as you get more comfortable. Don't let the tax tail wag the investment dog, as they say. The primary goal should still be good investing, with tax optimization as a secondary consideration. Also, if you're just starting out with more active trading, consider keeping a simple log of your decisions and the reasoning behind them. Not just for tax purposes, but to learn from your mistakes and successes. I wish I'd done this from the beginning - would have saved me from repeating some costly errors!

0 coins

This is such excellent advice about not letting tax optimization override good investment decisions! I made exactly this mistake when I first learned about tax-loss harvesting - I was so focused on realizing losses that I ended up selling some solid long-term positions during temporary dips just to get the tax benefit. The psychological aspect is so real. There's almost an addiction to trying to optimize every single trade for tax efficiency, but you're absolutely right that it can lead to analysis paralysis or worse, poor investment choices. I've found it helpful to set some basic rules for myself - like I won't sell a position I believe in long-term just for tax purposes, and I won't hold onto a fundamentally bad investment just to get long-term treatment. Your point about keeping a decision log is spot on too. I started doing this after reading some behavioral finance stuff, and it's amazing how many patterns you start to notice in your own decision-making. Plus it really helps during tax season when you're trying to remember why you made certain trades months ago! Thanks for adding that perspective - it's easy to get lost in all the technical details and forget that taxes are just one piece of the puzzle.

0 coins

Just wanted to chime in as someone who went through this exact learning curve last year! The transition from casual buy-and-hold to more active trading really does open up a whole world of tax complexity that nobody warns you about. One thing that helped me get started was using Fidelity's "Tax-Loss Harvesting" tool in their research section. It's not perfect, but it gives you a good overview of which positions in your portfolio have unrealized gains vs losses, and you can play around with different scenarios before actually executing trades. Really helped me understand the practical implications of FIFO vs specific ID without risking real money while I was learning. Also, don't beat yourself up about not knowing this stuff earlier - most brokers and financial educators do a terrible job explaining these concepts until you're already in deep. The fact that you're asking these questions now puts you way ahead of where I was at the same point in my investing journey. One last tip: if you're going to start using specific identification, make it a habit to always specify your lot selection EVERY time you trade, even if you think the default FIFO would be fine. It's much easier to build the habit consistently than to remember only when it matters, and you'll avoid accidentally missing optimization opportunities.

0 coins

Thanks for mentioning Fidelity's Tax-Loss Harvesting tool! I had no idea that existed and I've been using Fidelity for over a year. Just logged in and found it under the "Planning & Guidance" section - this is exactly the kind of visualization I needed to understand how my portfolio looks from a tax perspective. Your point about building the habit of always specifying lot selection is really smart. I can already see myself forgetting to do it on smaller trades and then kicking myself later. Better to just make it automatic from the start. It's actually reassuring to hear that others went through this same learning curve. Sometimes I feel like I'm the only one who jumped into active trading without understanding the tax implications first. But you're right that this stuff isn't explained well anywhere - even the "investing 101" content I consumed never really covered the practical day-to-day tax management aspects. I'm definitely going to spend some time this weekend playing around with that tax tool and maybe doing some paper trading scenarios to get comfortable with the lot selection process before I make any more real trades.

0 coins

As someone who works in tax preparation, I see this confusion all the time during tax season! You're definitely not alone in feeling overwhelmed by the FIFO/LIFO/SpecID decision - most of my clients who've transitioned to active trading have the same questions. One thing I always tell people is to think about your overall tax situation, not just the individual trades. If you're in a higher tax bracket this year but expect to be in a lower one next year (maybe due to retirement, job change, etc.), you might want to defer gains by using specific identification to sell your highest cost basis shares first. Conversely, if you expect to be in a higher bracket next year, it might make sense to realize some gains now. Also, don't forget about the Net Investment Income Tax (3.8% additional tax on investment income for higher earners). If you're close to those thresholds, strategic lot selection can help manage not just your regular capital gains tax but also whether you trigger NIIT. The good news is that once you get the hang of this, it becomes second nature. And the tax savings really do add up over time - I've seen clients save thousands just by being more intentional about their cost basis elections. Keep asking these questions and learning!

0 coins

This is incredibly helpful perspective from a tax professional! I hadn't even considered how my expected future tax bracket should influence my lot selection strategy. That's a whole other layer of complexity I need to think about. The point about the Net Investment Income Tax is especially eye-opening - I'm nowhere near those thresholds now, but if my trading continues to be successful, it's something I should probably start planning for. It sounds like there's a lot more strategic planning involved than just "pick the lots with the best cost basis." Your comment about it becoming second nature is reassuring. Right now it feels like there are so many variables to consider (cost basis, holding period, current vs future tax brackets, NIIT thresholds) that I'm worried I'll make the wrong choice. But I suppose like any skill, it gets easier with practice. Do you have any recommendations for resources where I can learn more about the broader tax strategy aspects? Most of what I've found focuses on the mechanics of FIFO vs LIFO but doesn't get into the bigger picture planning you're describing.

0 coins

For broader tax strategy resources, I'd recommend starting with IRS Publication 550 (Investment Income and Expenses) - it's dry but comprehensive. The Bogleheads wiki also has excellent sections on tax-efficient investing that go beyond just the mechanics. For more advanced planning, consider Kitces.com - Michael Kitces writes detailed articles about tax strategy that bridge the gap between basic concepts and professional-level planning. His pieces on tax-loss harvesting and asset location are particularly good. One practical tip: start tracking your marginal tax rate each year and any major life changes that might affect it (job changes, marriage, kids, etc.). This will help you make better real-time decisions about when to realize gains vs losses. You're right that it seems complex at first, but most people only need to master a few key concepts to capture 80% of the available tax savings. Also, don't underestimate the value of a one-time consultation with a fee-only financial advisor or CPA who specializes in investment taxation. Even just an hour or two of personalized advice based on your specific situation can save you years of trial and error.

0 coins

This thread has been incredibly educational! As someone who's just starting to deal with these tax implications myself, I wanted to share a resource that's been helping me understand the practical side of lot selection. I've been using the IRS's own examples in Publication 550 to work through scenarios with my actual trades. What I found helpful was creating a simple spreadsheet where I can input different lot selection methods (FIFO, LIFO, SpecID) for the same sale and see how each affects my tax liability. It really makes the abstract concepts concrete when you see the actual dollar differences. One thing I learned that wasn't immediately obvious: if you're doing tax-loss harvesting, timing matters a lot more than just the method you choose. I was so focused on FIFO vs SpecID that I didn't realize I should be coordinating my loss harvesting with the rest of my tax year strategy. Also want to echo the advice about keeping detailed records. I started using a simple note-taking app to jot down my reasoning for each lot selection at the time I make the trade. It's already proven helpful when reviewing my decisions, and I imagine it'll be even more valuable come tax season when I'm trying to remember why I made certain choices months ago. Thanks to everyone who shared their experiences and tools - this is exactly the kind of practical knowledge that's hard to find elsewhere!

0 coins

This is such a practical approach! I love the idea of creating a spreadsheet to model different scenarios with your actual trades. That's exactly the kind of hands-on learning tool I need to really understand the concepts instead of just reading about them in theory. Your point about timing being crucial for tax-loss harvesting is something I hadn't fully grasped either. I was thinking about it as just a trade-by-trade decision, but you're right that it needs to be coordinated with your overall tax strategy for the year. Do you do this planning at specific times during the year, or is it more of an ongoing process as opportunities arise? The note-taking idea is brilliant too - I can already imagine myself six months from now trying to remember why I chose specific identification over FIFO for some random trade. Having that context documented at the time of the decision seems like it would be invaluable for learning from your choices and improving your strategy over time. Thanks for sharing Publication 550 as a resource too. I keep seeing references to various IRS publications but wasn't sure which ones were actually worth reading versus just overwhelming technical jargon. Good to know there are practical examples in there that you can work through with real scenarios.

0 coins

This is exactly the kind of conversation I wish I'd found when I first started dealing with these tax implications! I've been lurking here for a while but finally created an account because this thread has been so helpful. I'm in a similar boat - started with simple index fund investing and then got more active last year. Made so many rookie mistakes because I had no idea about lot selection methods. I was basically just hitting "sell" and letting the broker figure it out with FIFO, which definitely wasn't optimal for my situation. What really opened my eyes was when I did my taxes this year and realized I'd paid way more than I needed to because I hadn't been strategic about which lots to sell. I had some positions with unrealized losses that I could have harvested, but instead I sold profitable lots using FIFO and owed more in taxes. Now I'm trying to be more proactive about this stuff. One thing that's helped me is setting up a simple tracking system where I note the purchase date and price for each lot when I buy, then before any sale I take a few minutes to look at my options. It's amazing how much difference it can make when you're intentional about it instead of just taking whatever the default is. Thanks to everyone sharing their experiences and tools - this community is awesome for learning this stuff that nobody teaches you when you're starting out!

0 coins

Welcome to the community and thanks for sharing your experience! It's really validating to hear from someone who went through the exact same learning curve. That feeling of realizing you overpaid on taxes because you didn't understand lot selection is so frustrating, but at least now you know what to do going forward. Your tracking system sounds like a great practical approach. I'm still figuring out the best way to stay organized with this stuff, and it sounds like taking those few minutes before each sale to review your options is a habit worth developing. It's crazy how much of a difference being intentional can make versus just accepting the defaults. One thing I'm curious about - when you're looking at your lot options before a sale, do you have a systematic way of deciding which method to use, or is it more case-by-case based on your current tax situation? I'm still trying to develop some consistent decision-making criteria so I'm not just guessing each time. And you're absolutely right about this community being great for learning practical stuff that's hard to find elsewhere. The real-world experiences and specific tools people have shared here are way more helpful than the generic investing advice you usually see online.

0 coins

IRS AI

Expert Assistant
Secure

Powered by Claimyr AI

T
I
+
20,095 users helped today