Capital Gains Tax Lot Optimizer
Compare open-lot sale orderings under fixed 24% short-term and 15% long-term assumptions. Inspect the selected lots and modeled net gains; this is not a personalized tax minimizer.
Your Tax Lots
Sale Scenario
Selling Strategy
Tax Rate Assumptions:
Short-term: 24% (ordinary income)
Long-term: 15% (preferential rate)
Fixed illustrative rates, not your brackets. Losses net only against selected gains. NIIT, state tax, wash sales, other trades and carryovers are excluded.
Compare remaining open lots, not a complete trade ledger
Enter or import the shares still available for sale. Each row is one acquisition lot with a symbol, YYYY-MM-DD date, USD price per share, remaining quantity and total acquisition fees for that remaining lot. Prior sales, splits, transfers and wash-sale basis adjustments must already be reflected in your inputs. Import appends rows and does not reconcile a broker statement or detect duplicates.
CSV requires symbol,date,price,quantity headers and optionally fees. JSON accepts an array of objects or a lots array, using symbol, purchaseDate, purchasePrice, quantity and fees. Files are limited to 2 MB and 5,000 imported rows. Invalid imports leave existing lots unchanged. Empty draft rows must be corrected or deleted before their symbol can be calculated.
What the orderings do
FIFO selects the earliest acquisition dates; LIFO selects the latest. HIFO selects the highest purchase price plus acquisition fees per share. At one sale price, ordering per-share gains from lowest to highest produces exactly the same order as HIFO, so the Loss-First option is not an additional optimization algorithm.
Only lots acquired on or before the sale date are available. A scenario requesting more shares than available stops rather than reporting a partial sale. Partial-lot acquisition fees are allocated in proportion to shares sold. The sale price is assumed net of selling fees per share.
Read the tax figure as a limited scenario
The calculation nets gains and losses within the short- and long-term groups, then offsets opposing group signs. Remaining positive short-term gains use 24%; remaining positive long-term gains use 15%. A net loss produces zero modeled tax, not a refund. These fixed assumptions do not use a tax year, income bracket or filing status.
The lowest modeled result is the lowest among the displayed orderings only. Equal results are ties even if one is highlighted. HIFO can reduce gain without minimizing tax because holding periods differ. Other investments, carryovers, wash sales, NIIT, state taxes and special-property rules can change the result. No manually selected specific-lot workflow or broker submission is implemented.
Broker identification and recordkeeping
For shares held by a broker, the IRS describes identifying the particular shares at the sale or transfer and obtaining written confirmation within a reasonable time. A report downloaded here does not accomplish that identification. See IRS Publication 550 for basis, identification, gain/loss netting and wash-sale rules, and Topic 409 for the general holding-period rule.
Lot calculations and import parsing run in this page. The tool attempts to save lots in this browser's IndexedDB; errors are shown and input remains in the tab. Export Lots saves a copy, while Export in the analysis saves the current scenario. Browser storage may be cleared, and downloaded files are your responsibility. This is not a claim about every site service's data handling.
Frequently Asked Questions
Does HIFO always minimize tax?
No. HIFO selects higher basis per share, which reduces gain for a fixed sale quantity and price. Different short- and long-term rates can change the tax comparison. This page compares only its displayed orderings under two fixed illustrative rates.
Does Loss-First detect wash sales?
No. It uses the same ordering as HIFO for this single-price scenario. The page does not inspect replacement purchases, other accounts, substantially identical securities or wash-sale basis adjustments. An apparent loss may not be currently deductible.
Can I choose specific lots here?
The tool displays allocations from preset orderings but does not provide manual specific-lot selection or submit an election to your broker. Confirm the applicable identification requirements before executing a sale.
How are losses and holding periods treated?
Only the selected sale allocations are netted, first within each term and then across opposing signs. Remaining positive gains use the displayed assumed rates. More than a calendar year is generally long-term. Gifted or inherited basis and holding-period rules are outside this model.
Does deleting the final lot persist?
After storage has loaded successfully, changes including an empty lot list are saved to this browser. A storage error is shown if saving fails. Export a copy before clearing browser data or leaving a tab with unsaved inputs.
What is included in an export?
Export Lots downloads the input open-lot array. Analysis Export contains the selected scenario, allocations and fixed-rate assumptions. Per-lot standalone tax figures are before netting and do not sum to the final netted tax when losses offset gains.
Related Tools
Capital Gains Tax Calculator
Estimate the tax liability on your investment profits.
Wash Sale Calculator
Estimate a US single-lot wash sale loss adjustment and taxable replacement-share basis within the inclusive 30-day-before/after window. Review excluded cases.
Average Cost Basis Visualizer
Track your investment cost basis over time with interactive charts. Calculate average cost per share, visualize how your cost basis changes with each trade, and analyze unrealized and realized gains.
Portfolio Performance Calculator
Track and analyze the overall performance of your investment portfolio.
Review the Income Assumptions Separately
Compare the effect of income and holding period using the separate capital gains calculator. Neither tool submits broker instructions or prepares a tax return.