Taxes on investing

Tax Lot Selection Method Calculator

Compare the tax one sale of a security adds under six ways of choosing the units you sell: oldest first, newest first, highest cost first, lowest cost first, a lowest-tax order and average cost. See the gain of each, split into short-term and long-term, the federal, net investment income and state tax it adds for 2025 or 2026, the method with the lowest tax of the six, and the tax it saves against oldest first. Estimates for education, not advice.

Last updated

Calculator overview

Inputs and outputs

This summary comes from the calculator's published input and output contract.

Inputs

Sell every unit you hold (required)
About this input

Whether you sell every unit you hold: Yes or No (No by default). Yes sells every unit of every lot and needs the units to sell left blank; one sale is at most 1 trillion units, so Yes needs at most 1 trillion units held. No sells the units you enter.

Default No Allowed No, Yes
Sale price per unit (required)
About this input

The price you sell each unit at, in dollars, from 0.0001 to 1 billion dollars a unit. The units you sell times this price must be at most 1 trillion dollars. The page lets you type up to four decimal places; that limits what you enter and see, it never rounds the price. Each lot's proceeds, the units it sells times this price, are rounded to whole dollars before any netting or tax.

Unit $ per unit Default 100 Range 0.0001 to 1000000000
Units to sell (required) Conditional
About this input

How many units of the security you sell when you do not sell every unit. Fractions are allowed. When Sell every unit you hold is No, it is required: above 0, at most the units you hold and at most 1 trillion. When it is Yes, it does not apply: the page hides it, and through the API you leave it out or send it empty or null; a value there is refused. This is your request: the units each method actually sells are worked out lot by lot, and with fractional units next to very large lots they can differ from it, up or down.

Unit units Default 250 Range 1E-06 to 1000000000000
Tax year (required)
About this input

The tax year of the sale. Its federal brackets, long-term breakpoints, standard deduction and limits apply.

Default 2026 Allowed 2025, 2026
State tax rate on the gain
When omitted Blank
About this input

The rate your state taxes the gain at, as a percentage. Leave blank if your state has no income tax or you want the federal tax only. One rate stands for your state's brackets.

Unit % Default Not set Range 0 to 0.2
Filing status (required)
About this input

Your filing status for the year. A qualifying surviving spouse uses married filing jointly, which has the same figures here.

Default Single Allowed Single, Married filing jointly, Married filing separately, Head of household
Your deductions (blank for the standard deduction)
When omitted Blank
About this input

Your total deductions for the year, in whole dollars. Leave blank to use the standard deduction for the tax year and filing status; enter your own figure if you itemize or take other deductions.

Unit currency Default Not set Range 0 to 1000000000000
Your lots of this security, oldest first (required)
About this input

The lots you hold of one security, one row per purchase from the first row: the date you bought it (year-month-day), the units (fractions allowed) and the cost basis, what you paid in total including fees, in whole dollars. Up to 200 lots, each bought on or before the date of the sale. A lot is long-term when it is sold after the same day one year after you bought it.

Default 5 rows
ColumnRange or allowed values
Date bought Not declared
Units 1E-06 to 1000000000000
Cost basis 0 to 1000000000000
Date of the sale (required)
About this input

The date of the sale, year-month-day. It must fall in the tax year, on or after the date of every lot, and it decides which lots have been held more than one year.

Unit date Default 2026-09-15
Other income for the year, before deductions (required)
About this input

Your other income for the year before deductions, in whole dollars: wages, interest, retirement income and the like, without this sale. It is treated as ordinary income, and the gain of the sale is stacked on top of it.

Unit currency/yr Default 90000 Range 0 to 1000000000000

Outputs

Part held one year or less, highest cost first
About this output

The part of the highest-cost-first gain or loss on units held one year or less.

Unit currency
Part held one year or less, FIFO
About this output

The part of the FIFO gain or loss on units held one year or less.

Unit currency
Part held one year or less, lowest cost first
About this output

The part of the lowest-cost-first gain or loss on units held one year or less.

Unit currency
Part held one year or less, LIFO
About this output

The part of the LIFO gain or loss on units held one year or less.

Unit currency
Model Status
About this output

Whether the inputs describe a sale the calculator can compute. NOT VALID names what to fix, CHECK flags a result to notice, such as two methods that tie for the lowest tax, and OK means neither applies.

No unit declared
The sale under each method
About this output

The sale under each of the six methods: the units it actually sells (worked out lot by lot; the average cost row shows the units sold oldest first, the units its dollars use), their cost, the part of the gain held one year or less and the part held longer, the gain or loss, the federal income tax, net investment income tax and state tax it adds, the total tax and what you keep. Every dollar figure is a sum of each lot's whole dollars, and stays exact because one sale is worth at most 1 trillion dollars.

No unit declared
Part held one year or less, average cost
About this output

The part of the average-cost gain or loss on units held one year or less, taking the holding periods of the units FIFO would sell.

Unit currency
Workbook self-check
About this output

PASS when every internal consistency check of the calculation holds for this result: each method sells approximately the requested units to sell (within 1E-9 times the larger of that request and 1, not exact equality), its two parts add up to its gain, each tax adds up, and the method shown has the lowest tax. FAIL means the result should not be relied on.

No unit declared
Part held one year or less, lowest-tax order
About this output

The part of the lowest-tax-order gain or loss on units held one year or less.

Unit currency
Tax the sale adds, lowest-tax order
About this output

The tax the sale adds with the lowest-tax order, measured the same way.

Unit currency
Tax the sale adds, lowest cost first
About this output

The tax the sale adds when the lowest-cost units are sold first, measured the same way.

Unit currency
Units you hold
About this output

The units you hold: the units of all your lots, added.

Unit units
Tax saved by the best method against FIFO
About this output

The tax the method with the lowest tax saves against selling the oldest units first (FIFO): the tax with FIFO less the tax with the best method. It is never negative, because FIFO is one of the six methods. The best method is the best of the six shown, not the best possible choice of lots.

Unit currency
Tax the sale adds, FIFO
About this output

The tax the sale adds with FIFO: the federal income tax and net investment income tax with the sale less without it, plus the state tax. It uses the exact federal rate schedules; the IRS Tax Table, used on returns with less than 100,000 dollars of taxable income, can differ by a few dollars.

Unit currency
Tax the sale adds, average cost
About this output

The tax the sale adds at average cost, measured the same way.

Unit currency
Tax the sale adds, LIFO
About this output

The tax the sale adds with LIFO, measured the same way.

Unit currency
Tax the sale adds, highest cost first
About this output

The tax the sale adds when the highest-cost units are sold first, measured the same way.

Unit currency
Your lots, and the units the best method sells
About this output

Each of your lots with its date bought, units, cost basis, unit cost, whether it has been held more than one year at the date of the sale, and how many of its units the method with the lowest tax sells.

No unit declared
Gain or loss on the sale, average cost
About this output

The gain or loss on the units at your average cost per unit, shown for comparison: average cost is available only for shares of regulated investment companies (such as mutual funds) and stock in a dividend reinvestment plan.

Unit currency
Tax on the sale with FIFO
About this output

The federal income tax, net investment income tax and state tax the sale adds when the oldest units are sold first (FIFO). A negative figure is a tax saving from a net loss.

Unit currency
Gain or loss on the sale, highest cost first
About this output

The gain or loss on selling the units that cost the most per unit first. It is never above the gain of any other method that sells lots.

Unit currency
Gain or loss on the sale, FIFO
About this output

The gain or loss on selling the units oldest first (FIFO): the proceeds less what those units cost.

Unit currency
Method with the lowest tax
About this output

The method, of the six compared, whose sale adds the least tax. When two or more tie within half a cent, the first of them in the table is shown and the status reads CHECK. It is the best of these six methods, not the best possible choice of lots.

No unit declared
Your average cost per unit
About this output

Your average cost per unit: the total cost basis of your lots over the units you hold.

Unit $ per unit
Tax on the sale with the best method
About this output

The federal income tax, net investment income tax and state tax the sale adds with the method shown as the lowest. A negative figure is a tax saving from a net loss.

Unit currency
What you keep with the best method
About this output

What you keep from the sale after tax with the method shown as the lowest: its proceeds, each lot's units sold times the sale price rounded to whole dollars and then added, less the tax the sale adds with that method.

Unit currency
Gain or loss on the sale, LIFO
About this output

The gain or loss on selling the units newest first (LIFO).

Unit currency
Part held more than one year, LIFO
About this output

The part of the LIFO gain or loss on units held more than one year.

Unit currency
Part held more than one year, highest cost first
About this output

The part of the highest-cost-first gain or loss on units held more than one year.

Unit currency
Part held more than one year, lowest-tax order
About this output

The part of the lowest-tax-order gain or loss on units held more than one year.

Unit currency
Part held more than one year, lowest cost first
About this output

The part of the lowest-cost-first gain or loss on units held more than one year.

Unit currency
Gain or loss on the sale, lowest-tax order
About this output

The gain or loss on selling the units in the lowest-tax order: first the lots whose units would add the least tax on their own at your rates without the sale, a loss first. Because short-term and long-term results net against each other, another method can still have a lower tax.

Unit currency
Gain or loss on the sale, lowest cost first
About this output

The gain or loss on selling the units that cost the least per unit first. It is never below the gain of any other method that sells lots.

Unit currency
Part held more than one year, FIFO
About this output

The part of the FIFO gain or loss on units held more than one year.

Unit currency
Part held more than one year, average cost
About this output

The part of the average-cost gain or loss on units held more than one year, taking the holding periods of the units FIFO would sell.

Unit currency
This page is provided by LogicCommons for informational purposes only. Results are model outputs computed from the inputs you supply and are not financial, investment, tax, accounting, or legal advice, and no advisory relationship is created. Verify all inputs and results independently before relying on them in any decision.

LogicCommons is in beta. If a result, label, or reference looks wrong, tell us here; we read every message.

Methodology

Purpose and model boundary

This calculator compares the tax that one sale of a security adds under six ways of choosing which units you sell, for tax year 2025 or 2026. You enter up to 200 lots of the security, each with the date you bought it, its units and its cost basis, then whether you sell every unit you hold or how many units you sell, the sale price and the date of the sale, and your tax situation: the tax year, your filing status, your other income before deductions and, if you wish, your own deductions and a state tax rate. The workbook sells the units oldest first (FIFO), newest first (LIFO), highest unit cost first, lowest unit cost first, in a lowest-tax order and at average cost. For each method it works out the gain, split into the part held one year or less and the part held longer, and the federal income tax, the 3.8% net investment income tax and the state tax the sale adds. The main result is the tax saved: the tax with FIFO less the tax with the method whose tax is lowest of the six.

The method shown as the lowest is the best of these six methods, not the best possible choice of lots. When the sold lots are not identified, they are charged against the earliest lots bought, which is why FIFO is the comparison.

For the tax on several sales already made in a year, use the Capital Gains Tax on Investment Sales Calculator; for one sale with both holding periods side by side, the Capital Gains Tax Calculator; and for the cost basis of repeated crypto purchases, the Crypto DCA Cost Basis Calculator.

Every figure on this page is computed by the spreadsheet; the page adds nothing to it. The model is educational. It is not a tax return, and it is not financial, investment, tax or legal advice.

Inputs and units

  • Your lots of this security: one row per purchase from the first row, up to 200. Each needs the date bought, as year-month-day between 1970 and 2099 and on or before the date of the sale; the units, above 0 and at most 1 trillion, with fractions allowed; and the cost basis, what you paid for the lot in total including fees, in whole dollars from 0 to 1 trillion dollars.
  • Sell every unit you hold: No or Yes. With Yes, every unit of every lot is sold, at most 1 trillion units in all.
  • Units to sell, when you do not sell every unit: required, above 0, at most the units you hold and at most 1 trillion. Fractions are allowed. When you choose to sell every unit, it does not apply: the page hides it and sends it empty, and through the API you leave it out or send it empty or null; a value there is refused. This is your request: the units each method actually sells are worked out lot by lot, and with fractional units next to very large lots they can differ from it, up or down.
  • Sale price per unit: from 0.0001 to 1 billion dollars a unit, both included. On the page you can type up to four decimal places; that is how precisely the page takes and shows a price, and the price itself is never rounded. The workbook takes any price in that interval as a decimal; the four places limit only what the page lets you type. Status 7's message below states this interval in short form, as "above 0". The value of the sale, the units to sell times the price (every unit you hold times the price when you sell every unit), must also be at most 1 trillion dollars.
  • Date of the sale: year-month-day, in the tax year you choose.
  • Tax year: 2025 or 2026. Its federal brackets, long-term breakpoints, standard deduction and limits apply.
  • Filing status: single, married filing jointly, married filing separately or head of household. A qualifying surviving spouse uses married filing jointly, which has the same figures in every table used here.
  • Other income for the year, before deductions, in whole dollars from 0 to 1 trillion dollars: wages, interest, retirement income and the like, without this sale. It is treated as ordinary income, and the gain of the sale is stacked on top of it.
  • Your deductions, optional, in whole dollars from 0 to 1 trillion dollars. Leave it blank to use the standard deduction for the tax year and filing status.
  • State tax rate on the gain, optional, from 0% to 20%. Leave it blank for no state tax. One flat rate stands for your state's rules.

Money you enter is in whole US dollars; the sale price is in dollars a unit and is not rounded; rates are percentages.

Governing relationships

A lot's unit cost is its cost basis over its units. A unit is long-term when the date of the sale is after the same day one year after the date it was bought, so a unit sold on the anniversary itself is still short-term; this follows the IRS rule that the holding period starts the day after you buy and includes the day you sell.

Five of the methods take whole lots in their own order and then part of one, until the units sold are reached:

  • oldest first (FIFO): by date bought;
  • newest first (LIFO): the latest date bought first;
  • highest cost first: the highest unit cost first;
  • lowest cost first: the lowest unit cost first;
  • the lowest-tax order: first the lots whose units would add the least tax on their own, a loss first. For each lot this is its gain per unit times the rate a unit of its kind adds without the sale (the long-term rate on the next dollar for a lot held more than one year, the ordinary rate on the next dollar otherwise), plus the state rate, plus the 3.8% net investment income tax rate when your income without the sale is already above its threshold.

Ties in any order go to the earlier date bought and then to the earlier row. Because short-term and long-term results net against each other, the lowest-tax order is not always the cheapest choice of lots, and another method can have a lower tax; the workbook therefore compares all six by their actual tax.

The sixth method, average cost, prices every unit sold at the average cost of all your units, the total cost basis over the units held. It is split into short-term and long-term parts by the holding periods of the units FIFO would sell, as the rule for average basis treats the first shares sold as those first acquired. Average basis is available only for shares of regulated investment companies (such as mutual funds) and stock in a dividend reinvestment plan, so it is shown for comparison.

For each lot a method sells, the proceeds and the cost of the units taken from it are worked out in whole dollars, half a dollar rounded away from zero, before any netting; a lot sold in full keeps its cost basis exactly. Each lot uses the units it actually sells, and a part of your request that no lot sells is not priced. A method's gain is the sum of its lots' proceeds less the sum of their costs, and its short-term and long-term parts are the same sums over the lots held one year or less and the lots held longer.

For each method, the federal tax follows the IRS Qualified Dividends and Capital Gain Tax Worksheet, once with that method's short-term and long-term results and once without the sale. The worksheet nets the two kinds of result, deducts a net loss up to the yearly limit (3,000 dollars, or 1,500 if married filing separately), stacks the long-term gain on the ordinary taxable income across the 0%, 15% and 20% bands, and keeps the smaller of that and the regular tax on all taxable income. The net investment income tax is 3.8% of the smaller of the gain included in income and the amount by which adjusted gross income exceeds the threshold for your filing status. The state tax is your state rate times the gain included, never below 0. Then

tax the sale adds (method) = federal tax with the sale − without it + net investment income tax with the sale − without it + state tax

tax saved = tax with FIFO − tax with the lowest method

what you keep = proceeds − tax with the lowest method

The method with the lowest tax is the first in the table whose tax is within half a cent of the lowest of the six, so the tax saved is never negative and is exactly 0 when FIFO ties for the lowest.

The figures each tax year uses are kept in the workbook by year, each with its source and the date it was read:

Figure (single · married filing jointly · married filing separately · head of household) 2025 2026
Top of the 0% long-term band, taxable income 48,350 · 96,700 · 48,350 · 64,750 49,450 · 98,900 · 49,450 · 66,200
Top of the 15% long-term band, taxable income 533,400 · 600,050 · 300,000 · 566,700 545,500 · 613,700 · 306,850 · 579,600
Standard deduction 15,750 · 31,500 · 15,750 · 23,625 16,100 · 32,200 · 16,100 · 24,150
Net investment income tax threshold, adjusted gross income 200,000 · 250,000 · 125,000 · 200,000 the same; the thresholds are not indexed for inflation
Yearly limit on a net capital loss 3,000 · 3,000 · 1,500 · 3,000 the same

Calculation sequence

The spreadsheet first checks the lots, the sale and the other inputs. It then computes each lot's unit cost, holding period and lowest-tax key, sells the units under each of the five lot methods and at average cost, runs the federal tax calculation for the chosen year and filing status once for each method and once without the sale, adds the net investment income tax and the state tax, picks the method with the lowest tax and works out the tax saved and what you keep. A block of consistency checks confirms the arithmetic before the status is returned.

Outputs and interpretation

The headline is the tax saved by the best method against FIFO. The cards show the method with the lowest tax, the tax on the sale with that method and with FIFO, and what you keep with the best method. The tables show the sale under each of the six methods (the units sold, their cost, the parts held one year or less and longer, the gain or loss, the federal income tax, the net investment income tax, the state tax, the total tax and what you keep) and each of your lots with its date bought, units, cost basis, unit cost, whether it has been held more than one year at the date of the sale and how many of its units the best method sells. Each method's gain, short-term part, long-term part and tax, the units you hold, your average cost per unit and the workbook's self-check are returned to the API and MCP.

The tax figures are what the sale adds to your year, not your whole year's tax; a negative figure is a saving from a net loss. Under the default inputs, five lots of 100 units each bought from 2019 to 2026 for 5,000, 9,400, 7,000, 11,000 and 9,500 dollars, and 250 units sold at 100 dollars on 2026-09-15 by a single filer with 90,000 dollars of other income and the standard deduction of 16,100, the taxable income without the sale is 73,900, in the 22% bracket, so long-term gain is taxed at 15%. Selling oldest first realises 7,100 dollars of long-term gain and adds 1,065 dollars of tax. Selling highest cost first takes the 2025 and 2026 lots, a 500-dollar short-term loss, and 50 units of the 2021 lot, a 300-dollar long-term gain; the net loss of 200 is deducted at 22%, a saving of 44 dollars. That is the lowest of the six (newest first adds 150, lowest cost first 1,245, the lowest-tax order saves 33 and average cost adds 607.50), so the tax saved is 1,109 dollars and you keep 25,044 dollars of the 25,000 proceeds.

The chart shows the tax the sale adds under each method, one column each: the lowest in blue, the others in grey, a column below zero being a saving.

Validation and status logic

The workbook evaluates the conditions below from top to bottom and returns the first matching status.

Priority Condition Returned status
1 A lot row is partly filled NOT VALID: each lot needs the date bought, the units and the cost basis
2 No lot is entered, or an empty row sits between lots NOT VALID: list your lots from the first row, with no empty rows between them
3 A date bought is not a date, is outside 1970 to 2099, or is after the date of the sale NOT VALID: each date bought must be a valid date on or before the date of the sale
4 A lot's units or cost basis is outside the supported interval, or a cost basis is not whole dollars NOT VALID: the units of each lot must be above 0 and at most 1 trillion, and each cost basis whole dollars from 0 to 1 trillion dollars
5 The date of the sale is not a date or is not in the chosen tax year NOT VALID: the date of the sale must be a valid date in the tax year you chose
6 Sell every unit is not No or Yes; under No the units to sell are blank, 0 or below, more than the units you hold or more than 1 trillion; under Yes a value is entered for the units to sell, or the units held exceed 1 trillion NOT VALID: choose whether to sell every unit; if not, the units to sell must be above 0 and at most the units you hold; if so, leave them blank; one sale is at most 1 trillion units
7 The sale price is outside the supported interval, 0.0001 to 1 billion dollars a unit, or the value of the sale, the units to sell (every unit you hold when you sell every unit) times the price, is above 1 trillion dollars NOT VALID: the sale price must be above 0 and at most 1 billion dollars a unit, and the units sold times the price at most 1 trillion dollars
8 The tax year is not one of the choices NOT VALID: choose a tax year from the list (2025 or 2026)
9 The filing status is not one of the choices NOT VALID: choose a filing status from the list
10 Other income is outside the supported interval or not whole dollars NOT VALID: other income must be whole dollars from 0 to 1 trillion dollars
11 Deductions are entered and outside the supported interval or not whole dollars NOT VALID: deductions must be blank or whole dollars from 0 to 1 trillion dollars
12 A state tax rate is entered and outside the supported interval NOT VALID: the state tax rate must be blank or from 0% to 20%
13 The workbook's self-check fails CHECK: the self-check of the workbook failed for this result, so do not rely on it; please report it
14 Two or more methods tie for the lowest tax CHECK: two or more methods tie for the lowest tax; the first of them in the table is shown
15 None of the preceding conditions applies OK

NOT VALID is a refusal, not a numeric answer: every number reads zero, the method reads "Not computed" and the tables are empty. CHECK accompanies a computed result but calls for the stated review; a tie is common when every method sells the same units, as when you sell every unit you hold. The self-check is reported separately as arithmetic-integrity evidence; it does not replace this ordered status chain.

Assumptions and limitations

The limits on the inputs keep the dollar figures exact. The value of the sale is at most 1 trillion dollars and each cost basis at most 1 trillion dollars, so every whole-dollar figure the workbook works out for the sale (each lot's proceeds and cost, each method's gain and its short-term and long-term parts) is a whole number small enough to be stored exactly, and adding the lots in a different order gives the same total. The units each method sells are worked out lot by lot, and with fractional units next to very large lots they can differ slightly from your request, as described under the units to sell.

The ordinary tax uses the exact federal rate schedules. A return with less than 100,000 dollars of taxable income uses the IRS Tax Table, which taxes 50-dollar bands at their midpoint, so a filed return can differ by a few dollars. The model covers one security and one sale. It does not include other sales in the year, qualified dividends or other investment income, collectibles or unrecaptured section 1250 gain, a capital loss carried in from an earlier year, wash sales, the alternative minimum tax, or the additional standard deduction for age or blindness or the senior deduction (enter your own deductions instead). The lowest-tax order is a rule of thumb, not a search of every possible set of lots, and the best method shown is the best of the six. Whether you may identify specific lots, and how, depends on your broker and on current law. The state tax is one flat rate on the gain and does not follow any state's brackets or loss rules. A lot bought on 29 February counts as held more than one year from 1 March of the next year, which follows from the IRS counting rule; the IRS does not address that date directly.

Restrictions and non-computing states

This calculator enforces its numeric and choice limits before it accepts a result. The tax year and filing status come from their lists; a lot bought after the sale, a sale dated outside the chosen year, more units sold than you hold, units to sell entered when you sell every unit, a cost basis, other income or deductions that are not whole dollars, a partly filled row and a gap between rows are refused by the workbook. Blank deductions mean the standard deduction, and a blank state rate means no state tax.

Errors and warnings

A request rejected by the page's input limits is not a computed result. A transport or service failure cannot establish a fresh workbook answer. Review the workbook's References and Disclaimer and current tax rules with a qualified professional before using a result for a real decision.

References

Sources and further reading

Your lots, the sale, your income, deductions and state rate come from the inputs. The federal figures for each tax year come from the two Revenue Procedures, Topic 409 and the IRS questions and answers on the net investment income tax. They are kept in the workbook by year with the date each was read, and the workbook's References sheet lists them with Publication 544, 26 CFR 1.1012-1 and the three Microsoft functions. The Form 1040 and Schedule D instructions and Publication 550 are added on this page as further explanation; the workbook's References sheet does not list them. The links explain the rules the model follows; they do not endorse this calculator.

  • Revenue Procedure 2024-40, section 2.01 and section 2.03, gives the 2025 rate schedules and the 0% and 15% long-term breakpoints for each filing status (retrieved 2026-10-20).
  • Revenue Procedure 2025-32, section 4.01, section 4.03 and section 4.14, gives the 2026 rate schedules, long-term breakpoints and standard deductions, and section 3.01 the 2025 standard deductions as amended by Public Law 119-21, which replace those in Revenue Procedure 2024-40; section 2.08 describes the change (retrieved 2026-10-20).
  • IRS Topic 409, Capital gains and losses, explains the more-than-one-year rule for long-term gains, the 0%, 15% and 20% rates, and the yearly limit of 3,000 dollars, or 1,500 if married filing separately, on a net capital loss (retrieved 2026-10-20).
  • Instructions for Form 1040 (2025), Qualified Dividends and Capital Gain Tax Worksheet, sets out how the long-term gain is stacked on ordinary taxable income and that the tax is the smaller of that figure and the regular tax; it also says the IRS Tax Table is used below 100,000 dollars of taxable income (retrieved 2026-10-20).
  • Instructions for Schedule D (Form 1040) (2025), Capital Losses, explains how short-term and long-term results are reported (Parts I and II) and the limit on a net loss (retrieved 2026-10-20).
  • IRS Publication 544 (2025), chapter 4, "Holding period", explains that counting starts the day after you acquire an asset and includes the day you dispose of it, so a sale on the anniversary is not held longer than one year (retrieved 2026-10-20).
  • IRS Publication 550 (2025), Investment Income and Expenses, explains identifying the shares you sell, the first-in, first-out rule when you cannot identify them, and average basis for mutual fund shares (retrieved 2026-10-20).
  • 26 CFR 1.1012-1, Basis of property: paragraph (c)(1)(i) charges stock sold against the earliest lot acquired when the lot cannot be adequately identified; paragraph (e)(1) allows average basis only for shares of a regulated investment company and stock acquired after 2010 in a dividend reinvestment plan, held in an account; and paragraph (e)(7)(ii) treats the shares sold under average basis as those first acquired, which is how the average-cost row is split into short-term and long-term parts (retrieved 2026-10-20).
  • IRS Questions and Answers on the Net Investment Income Tax gives the 3.8% rate, the thresholds for each filing status and that they are not indexed for inflation (retrieved 2026-10-20).
  • Microsoft Support's EDATE, SUMPRODUCT and CHOOSE documentation describe the date, summing and selection functions the workbook uses for the one-year test, the lot orders and the rate schedules.

This is an educational estimate, not financial, investment, tax or legal advice. Which lots you may identify, and when, depends on your broker and on current law; tax rules and figures change every year and depend on your whole return. Check them against current IRS guidance and a qualified professional before you sell or file.

Results are informational and not professional advice. See our Terms of Use. Powered by SpreadsheetWeb · About · Privacy · Terms