Stock Profit Calculator – Trade P/L, Average Cost, Dividends and Target Price
The Stock Profit Calculator helps investors and traders analyze stock positions more clearly. It combines several essential views: trade profit and loss, average cost per share across multiple purchases, dividends and total return, and the required sell price to reach a profit target.
Whether buying and selling shares occasionally or actively managing a stock portfolio, understanding the true cost, net profit and performance of each position is important. This calculator uses simple inputs to provide an organized overview of stock results and planning scenarios.
How the Stock Profit Calculator Works
The calculator is organized into four modes that reflect common questions stock investors have:
- Trade Profit / Loss: What is the net profit or loss on a completed stock trade?
- Average Price: What is the average cost per share when purchasing in multiple lots?
- Dividends & Total Return: How much was earned from price gains and dividends combined?
- Target Sell Price: At what price should the stock be sold to lock in a desired profit?
Each mode can be used independently or together. For example, the average price mode can be used to determine cost basis before using the target price mode to plan exits.
Mode 1: Trade Profit / Loss
This mode calculates gross and net profit or loss for a single completed trade based on buy price, sell price, number of shares and trading fees. It also calculates the total cost basis and return on investment (ROI).
Trade Profit Formula
Cost basis includes the money paid for the shares plus buy-side fees. ROI is calculated as:
This gives a clear view of how efficient a trade was after accounting for commissions and fees.
Mode 2: Average Price Across Multiple Buys
Stock investors often add to positions in separate lots at different prices. The Average Price mode calculates the combined average cost per share when there are multiple entries. It supports up to three purchase lots, along with an optional assumed sell price.
Average Cost per Share
When a hypothetical sell price is entered, the calculator also shows the profit or loss that would result at that price after total fees.
Mode 3: Dividends and Total Return
Many investors focus not only on capital gains but also on dividends. This mode combines both benefits over a specified holding period. It uses buy price, sell price, number of shares, annual dividend per share, holding years and total fees.
Dividends and Capital Gains
To estimate annualized total return, the calculator compares the initial investment with the ending value (including dividends) over the holding period.
This helps evaluate whether a stock position delivered attractive performance compared with other opportunities.
Mode 4: Target Sell Price
The Target Price mode helps plan exits. Based on buy price, number of shares, total commissions and a desired profit amount or percentage, it determines the sell price per share required to meet the goal.
Target Price Calculation
If a profit amount is chosen, the required net proceeds are:
The required sell price per share is then:
When a profit percentage is entered, the calculator uses that percentage of cost basis as the required profit instead of the fixed amount and reports both the target price and the resulting percentage.
Why Use a Stock Profit Calculator?
Stock trades often involve multiple inputs: entry price, exit price, number of shares, fees and dividends over time. Estimating results by hand can be imprecise, especially for multi-lot positions. A dedicated calculator makes it easier to:
- Understand real profit or loss after costs.
- Track average cost when averaging into positions.
- Include dividends when analyzing long-term holdings.
- Set realistic price targets based on defined profit goals.
- Compare the performance of different stocks or strategies.
Example: Single Trade Profit
Suppose 100 shares of a stock are bought at $30 with $5 in fees and sold at $36 with another $5 in fees. Gross profit is ($36 − $30) × 100 = $600. Total fees are $10, so net profit is $590. Cost basis is $3,005, and ROI is around 19.6%.
Example: Average Price and Target
Consider buying 50 shares at $40 and another 50 shares at $45. Total cost is $2,000 + $2,250 = $4,250 for 100 shares, giving an average price of $42.50. If the goal is to make $750 profit after $20 total fees, the target proceeds are $4,250 + $20 + $750 = $5,020. That requires a sell price of $50.20 per share.
Related Tools from MyTimeCalculator
Explore more investing and finance calculators:
- Day Trading Profit Calculator
- Compound Interest Calculator
- Rule of 72 Calculator
- Investment Calculator
Stock Profit Calculator FAQs
Frequently Asked Questions About Stock Profit
Find quick answers about stock trade P/L, average cost, dividends and target prices.
The formulas shown are written for long positions. Short selling can be modeled by reversing buy and sell prices, but always confirm the logic for your own use case.
This calculator focuses on pre-tax results. Tax treatment varies by country and account type, so tax effects should be evaluated separately.
Yes. The same profit, average cost and dividend formulas apply to ETFs and mutual funds when expressed per share or per unit.