Free Stock Profit & Loss Calculator

Calculate the profit or loss on any stock trade. Enter buy price, sell price, and number of shares to see net profit, ROI, and estimated after-tax returns including brokerage fees.

Related Tools

Frequently Asked Questions

How is stock profit calculated?

Stock profit = (Sell Price − Buy Price) × Shares − Total Fees. If you bought 100 shares at $50 and sold at $65 with $20 in fees, profit = (65−50)×100 − 20 = $1,480.

What are capital gains taxes on stocks?

In the US, short-term gains (held ≤1 year) are taxed at ordinary income rates. Long-term gains (held >1 year) are taxed at 0%, 15%, or 20% depending on income. Holding for over a year typically results in lower tax.

What is the break-even price after fees?

Break-even = Buy Price + (Total Fees / Number of Shares). If you paid $5,000 for 100 shares with $10 commission, break-even is $50.10/share. You need the stock to exceed this to profit.

Calculating Stock Profits: Gains, Losses, and Tax Implications

Understanding how to calculate stock trade profits — and particularly the tax implications of different types of gains — is essential for any investor who buys and sells individual stocks, ETFs, or other securities. A sale that appears profitable can look quite different after taxes are applied, and the difference between short-term and long-term capital gains rates can make a significant difference in after-tax returns. Calculating stock profits correctly also provides the accurate performance data needed to make informed portfolio decisions.

Basic Profit Calculation

The profit from a stock sale is the difference between the proceeds from the sale and your cost basis. Proceeds = Sale Price × Shares Sold, minus any trading commissions paid to sell. Cost Basis = Purchase Price × Shares Purchased, plus any trading commissions paid to buy. Profit = Proceeds - Cost Basis. If you bought 100 shares of a stock at /share (cost basis = ,500) and sold at /share (proceeds = ,200), your profit is ,700. The percentage return is (,700 / ,500) × 100 = 37.8%.

When selling only part of a position purchased in multiple lots at different prices, you must identify which specific shares you are selling to determine the correct cost basis. Different cost basis methods — First In First Out (FIFO), Last In First Out (LIFO), specific lot identification, and average cost — produce different gains and tax outcomes. Specific identification, which lets you choose the exact lot to sell, offers the most tax planning flexibility. Choosing to sell high-cost basis shares first minimizes current taxable gains; selling low-cost basis shares first might be appropriate if you want to recognize losses for tax purposes. Most brokers allow you to specify the lot at the time of sale.

Short-Term vs. Long-Term Capital Gains

The duration you hold a stock before selling determines the tax rate applied to the gain. Shares held for one year or less generate short-term capital gains, taxed as ordinary income — at your marginal federal income tax rate of 10-37% plus any applicable state income tax. Shares held for more than one year generate long-term capital gains, taxed at preferential rates: 0% for taxable income below ,025 (single filers, 2024), 15% for income up to ,900, and 20% above that threshold, plus the 3.8% Net Investment Income Tax (NIIT) for high earners.

The difference between short-term and long-term capital gains rates is substantial. A ,000 short-term gain for someone in the 24% federal tax bracket costs ,400 in federal taxes. The same ,000 as a long-term gain costs only ,500 (at 15% LTCG rate). Waiting one additional day to cross the one-year threshold can save hundreds or thousands of dollars on a single trade — making the holding period a practical consideration when you're near the one-year mark with a profitable position. State income taxes add to the total burden and vary by state, with some states having no capital gains preference (taxing long-term gains as ordinary income).

Capital Losses and Tax Loss Harvesting

Capital losses — when you sell a security for less than your cost basis — can offset capital gains, reducing your overall tax bill. Short-term losses first offset short-term gains; long-term losses first offset long-term gains; excess losses of either type can be used to offset gains of the other type. If total capital losses exceed capital gains in a tax year, up to ,000 in net capital losses can offset ordinary income, with any remaining loss carried forward to future years indefinitely.

Tax loss harvesting — intentionally selling securities at a loss to realize the tax benefit — is a strategy employed by many investors, particularly toward year-end. If a position has declined and you believe it will eventually recover but you can use the tax benefit now, you can sell it, take the loss, and immediately purchase a similar (but not "substantially identical") security to maintain market exposure. The wash sale rule prevents claiming a loss if you repurchase the same security within 30 days before or after the sale — but you can buy a different ETF tracking a similar index or buy the same security after the 31-day window. Over many years, systematic tax loss harvesting in a taxable portfolio can add meaningful after-tax returns.

Dividend Income and Return of Capital

Stock returns come not only from price appreciation but also from dividends. Qualified dividends — paid by US corporations and certain foreign corporations on shares held for at least 61 days — are taxed at the same preferential rates as long-term capital gains. Ordinary dividends (including those from REITs, MLPs, and short-held shares) are taxed at ordinary income rates. Tracking dividend income separately from capital gains is important for accurate total return calculation and correct tax reporting.

Dividend reinvestment programs (DRIPs) automatically use dividend payments to purchase additional shares. Each reinvested dividend creates a new cost basis lot at the price on the reinvestment date. Tracking these reinvestment lots is the most complex aspect of dividend reinvestment accounting — after years of reinvestment, you may have dozens of small lots with different cost bases. Brokerage accounts increasingly track cost basis automatically, but if you have older investments or changed brokers, manually reconstructing cost basis history from historical dividend records may be necessary. Keeping accurate records of all purchases, including reinvested dividends, prevents inadvertent double-taxation when you ultimately sell.

Reporting Stock Gains on Your Tax Return

Stock transactions are reported to the IRS on Form 1099-B by your brokerage. Capital gains and losses are reported on Schedule D of Form 1040, with detail on Form 8949. Brokerage-reported cost basis may be incorrect for older purchases, transfers between brokerages, or shares received as gifts or inheritance — always verify cost basis figures against your own records before filing. Inherited shares receive a step-up in cost basis to fair market value on the date of the original owner's death, potentially eliminating significant embedded gains for heirs — an important estate planning consideration for appreciated securities.