Your cost basis is what you actually paid for an investment β and it drives both your break-even price and the capital gain or loss you'll report when you sell. This calculator blends multiple purchase lots, folds in commissions and fees, and shows how a new buy moves your average. It's built for investors dollar-cost averaging into a stock, adding to a position after a dip, or simply tracking a holding they bought in pieces.
How the cost basis calculation works
The average-cost method is simple arithmetic: add up every dollar you spent β the price of each lot plus any commissions and fees β and divide by the total number of shares. The result is a single weighted-average cost per share. Larger lots and higher fees pull the average up; cheaper or larger later buys pull it down.
Because this calculator adds fees into the basis, your average cost doubles as your break-even price: the price your shares must reach for the position to be worth what you paid. Sell above it and you have a gain; sell below it and you have a loss, before taxes.
Average cost vs FIFO and specific-lot
Average cost is the default for mutual funds and a convenient way to think about a position, but it is not the only method the IRS allows. FIFO (first in, first out) assumes you sell your oldest shares first, and specific-lot identification lets you choose exactly which shares to sell. For partial sales these methods can produce very different taxable gains β selling your oldest, cheapest shares under FIFO often realizes a larger gain than the blended average would suggest.
This tool reports the average-cost view, which is ideal for tracking your overall position and break-even. When you actually sell, check which method your broker applies and whether a different election would lower your tax bill.
Why fees matter more than they look
A few dollars of commission seems trivial, but fees are added to your basis on every buy and subtracted from proceeds on every sell. On small or frequent trades β and on crypto exchanges that charge a percentage β they quietly raise your break-even. The calculator surfaces total fees separately so you can see exactly how much of your basis is transaction cost rather than the asset itself.
The risk of averaging down
Averaging down lowers your average cost, which feels reassuring: your break-even drops and a smaller recovery returns you to even. But it also means committing more capital to a position that has already lost money. If the decline reflects a real deterioration in the company or asset, you are increasing β not reducing β your risk. Use the Average Down tab to see the new break-even, then decide whether the thesis still holds, not just whether the math looks better.
Limits and when to get advice
This calculator does not connect to your broker, so it cannot detect stock splits, dividend reinvestment, return-of-capital adjustments, or wash sales automatically β all of which change your true basis. For accurate tax reporting, reconcile against your broker's 1099-B and consolidated statements. For decisions with meaningful tax consequences, consult a qualified tax professional.