Cost Basis Calculator

Every lot, your true average cost, FIFO sale math with long/short-term splits — and the return-of-capital adjustment income-ETF holders always miss. Nothing you type leaves your browser.

1 · Your Purchase Lots

One row per purchase. Dates are optional but unlock the long-term vs short-term split. Reinvested dividends count as new lots at the reinvestment price.

Purchase date Shares Price / share ($) Fees ($) Lot cost
2 · Return of Capital Adjustment (optional — income-ETF holders, this is for you)

High-yield funds (YieldMax, NEOS, autocallables…) often classify part of their distributions as return of capital — untaxed when paid, but it quietly lowers your basis. Your broker's 1099 or the fund's 19a notices show the ROC amounts.

Across all your shares, since purchase. Leave 0 to skip.

3 · Model a Sale (optional)
0 = just show my basis.

How This Calculator Works (and What It Won't Pretend)

Your cost basis is the money you actually put in: shares × price + fees, summed over every lot. When you sell, gains are computed against specific shares — by default, brokers consume your oldest lots first (FIFO), and each lot's own purchase date decides whether its slice of the gain is long-term (held over a year — taxed at 0/15/20% for most filers) or short-term (taxed like wages). One sale can be both at once; the split above shows exactly how much of each.

The return-of-capital adjustment is the part most calculators skip and most income-ETF holders discover at tax time: ROC distributions weren't taxed when they landed, so the IRS subtracts them from your basis instead. This calculator spreads your total ROC across your shares pro-rata; if cumulative ROC exceeds a lot's basis, the excess portion is itself taxable gain — we flag it when that happens. Our plain-English ROC guide covers why high-yield funds do this, and the House Money Calculator answers the related question — how much of your position your payouts have already repaid.

Honest limits: this is an estimator for planning, not tax software. It models FIFO (the default) — if you use specific-lot identification at your broker, your realized numbers can differ (often in your favor; that's the point of spec-ID). Wash-sale rules, inherited/gifted basis, and mutual-fund average-cost elections are beyond a calculator this honest about its scope — the FAQ below covers the basics, and a tax professional covers the rest.

Track Basis, ROC & Payouts All Year

The $14 Snowball Tracker spreadsheet keeps every lot, every distribution, and your true yield-on-cost in one place — Excel & Google Sheets.

See the Tracker
Educational tool only — not tax or financial advice. Estimates use simplified FIFO and pro-rata ROC assumptions and ignore wash sales, corporate actions, and account-specific rules. Verify against your broker's tax-lot records and consult a tax professional before acting. Nothing here is a recommendation to buy or sell any security.