Stock Calculator

The Stock Calculator is an all-in-one tool that works out your profit and ROI on a share trade, your new average cost after averaging down, and how many shares to buy for a given risk. You pick a tab, then enter your prices, share counts or account and stop-loss. It returns your profit, average cost or share count before you buy, average down or commit the capital.

Enter a buy price, sell price and share count to get your profit and ROI.

Advanced options
Profit / Loss
+$1,000.00
+20.0% ROI · 50.00 shares
ROI
+20.0%
Cost basis
$5,000.00
Break-even
$100.00

Selling 50.00 shares bought at $100.00 and sold at $120.00 gives +$1,000.00 (+20.0%). For fees on both legs, tax and dividends, use the Stock Profit Calculator.

Show the math
+$1,000.00 = ($120.00 − $100.00) × 50.00 shares
eToro
Rated 78/100 by InvestinGoal
  • Minimum deposit: $50
Visit eToro
Reviewed by Filippo Ucchino Founder, InvestinGoal

These results are estimates for educational purposes only and are not financial, investment or tax advice.

What is a stock calculator?

A stock calculator is an all-in-one tool that works out your profit and ROI on a buy and sell, your new average cost after averaging down, and how many shares to buy for a given risk. It bundles three related stock calculations into one tool, arranged as three tabs. The Profit / ROI tab returns the profit or loss, the ROI and the break-even on a completed or planned trade. The Average down tab returns your new weighted-average cost after adding shares to a position you already hold. The Position size tab returns the number of shares to buy so that a trade risks only the amount you set.

Each tab answers a different question around a share position: what a buy and sell earns, what a second purchase does to your average cost, and how large a position your risk budget allows. Every figure is worked out from the prices, share counts and account details you type in, with no live market price required, so the tool is quick math rather than a data feed.

Why is the stock calculator important for investing?

The stock calculator is important for investing because it turns a share price, a cost basis and a risk budget into concrete numbers before you buy, average down or commit the capital, which is what a buying or sizing decision actually depends on. Buying on a round number of dollars or a gut feel hides the figures that matter: the cost of not measuring them first is a trade whose real return you never checked, an average-down that quietly doubled your exposure, or a position far larger than the loss you can afford. Knowing your profit and ROI, your new average cost and the share count your risk allows is what separates a position you have measured from one you have assumed.

Investors reach for these figures at different moments. You use the Profit / ROI tab before or after a sale to measure the return, the Average down tab before adding to a position that has fallen, and the Position size tab before opening a trade to size it from the risk rather than a round dollar amount. Quantifying the money at stake before you commit it is the core discipline of investing, where a planned outcome is one you have measured and a guess is one you have not.

How do you use the stock calculator for stock investing?

To use the stock calculator, pick the tab for the question you have, enter the inputs it shows, and the tool returns your profit and ROI, your new average cost, or the number of shares to buy when you press Calculate.

The steps to use the stock calculator are listed below:

  1. Select a tab. Choose Profit / ROI to work out a buy and sell, Average down to fold a new purchase into a position you hold, or Position size to size a new trade from your risk.
  2. Enter the trade on the Profit / ROI tab. Type the buy price per share, the sell price per share, the number of shares, and any total fees; the tool returns the profit or loss, the ROI, the cost basis and the break-even price.
  3. Enter the two lots on the Average down tab. Type your current shares and current average price, then the new shares and new price; the tool returns your new average cost, total shares and total cost.
  4. Enter the risk on the Position size tab. Type your account balance, the risk per trade as a percentage, your entry price and your stop-loss price; the tool returns the shares to buy, the amount at risk and the position value.

Every result updates when you press Calculate, and each tab remembers its own inputs if you save your defaults. Open Advanced options to switch the display currency between USD, EUR and GBP. Because profit, cost basis and risk-based sizing are the everyday math of stock investing, the calculator is built around share prices, share counts and your account balance rather than lots, pips or contracts.

What formula does the stock calculator use to work out profit and ROI?

The formula the stock calculator uses on the Profit / ROI tab is the gain per share multiplied by the number of shares, less any fees, with the ROI being that profit divided by the cost basis.

profit=(sellbuy)×sharesfees;ROI=profit÷cost basis×100

In this formula, buy and sell are the prices per share, shares is the number bought, fees is the total cost of trading, and cost basis is the buy price times the shares plus fees. Multiplying the price change by the shares and subtracting fees gives the profit or loss in money, and dividing that by the cost basis gives the percentage return.

Filling in a $100.00 buy and a $120.00 sell on 50 shares with no fees: ($120.00 − $100.00) × 50 = +$1,000.00, a +20.0% ROI.

The formula assumes a single aggregate fee and no tax, so on the quick tab the ROI is a gross figure; the Average down tab uses a weighted average (total cost divided by total shares) and the Position size tab uses risk divided by per-share risk, each covered below.

What is an example of a stock profit calculation?

An example of a stock profit calculation is buying 50 shares at $100.00 and selling them at $120.00 with no fees, which returns a profit of +$1,000.00 and a +20.0% ROI, worked out as follows:

  1. Cost basis = $100.00 buy × 50 shares = $5,000.00 (no fees).
  2. Profit = ($120.00 − $100.00) × 50 shares = +$1,000.00.
  3. ROI = +$1,000.00 ÷ $5,000.00 × 100 = +20.0%, and the break-even is the $100.00 buy price, because with no fees you need only to recover what you paid.

This matches the tool's "Show the math" line: +$1,000.00 = ($120.00 − $100.00) × 50 shares. Adding $50.00 in total fees to the same trade lowers the profit to +$950.00 on a $5,050.00 cost basis, a +18.81% ROI, which is why fees belong in the calculation rather than as an afterthought.

How do you read the stock calculator's results?

You read the stock calculator's results by taking each tab's headline figure as the answer to that tab's question, then reading the interpretation line beneath it that puts the number in the context of your decision. On the Profit / ROI tab, the headline is the profit or loss, shown in green when positive and red when negative, and the line reads it back: selling 50 shares bought at $100.00 and sold at $120.00 returns +$1,000.00, a +20.0% ROI on the $5,000.00 invested. The ROI is that profit measured against the money you put in, the standard way to compare returns across trades of different sizes, and the break-even is the price at which the position neither gains nor loses once fees are counted.

On the Average down tab, the headline is your new average cost, and the line states the move: adding 100 shares at $40.00 to 100 shares at $50.00 lowers your average cost from $50.00 to $45.00, a $5.00 drop across 200 shares. A lower average cost means a lower price at which the position returns to profit, though it never falls below your cheapest buy. On the Position size tab, the headline is the number of shares to buy: risking $200.00 with a $45.00 stop against a $50.00 entry buys 40 shares, a $2,000.00 position. When the risk per trade climbs above 3%, the tab flags the size as aggressive, because risking more than the widely cited 1% to 2% of your account on a single stock, a rule of thumb documented by trading educators such as Investopedia, leaves little room for a run of losses.

What are the limits of the stock calculator?

The stock calculator returns an estimate built from the inputs you give it, and the three tabs are the quick versions of calculations that a dedicated tool takes further. The Profit / ROI tab uses a single aggregate fee and no tax, so it does not separate the commission on the buy from the one on the sell, and it excludes capital gains tax and any dividends, all of which sit between the gross ROI here and what you actually keep; a full result with fees on both legs, tax and dividends belongs to the dedicated stock profit calculator. The Average down tab is limited to two lots and does not show your unrealized profit or loss against today's price or a fee-adjusted break-even, which the dedicated average down calculator adds across unlimited buys.

The Position size tab assumes whole shares and rounds down, so the position risks slightly less than your budget rather than more, and it ignores fees and commissions on the trade. None of the tabs use live market prices: every figure comes from the numbers you type, so a result is only as current as your inputs. The tool tells you what a trade earns, what a purchase does to your average, and how many shares your risk allows; it does not tell you whether a stock is worth buying, and it is an educational tool rather than financial advice.

What are common mistakes when using the stock calculator in risk management?

The most common mistakes when using the stock calculator are reading the quick ROI as your net return, averaging down without a plan, and sizing a position larger than your risk allows, each of which makes a trade look safer or more profitable than it is. These are errors of risk management as much as of arithmetic, because every one of them understates how much a position really puts at stake.

  • Forgetting fees and taxes. The Profit / ROI tab takes one aggregate fee and no tax, so the ROI it shows is gross; the return you keep, after commissions on both legs and capital gains tax, is lower, which the dedicated stock profit calculator works out in full.
  • Averaging down without a plan. Lowering your average cost feels like progress, but adding to a stock that keeps falling increases your exposure to a thesis that may be wrong, the pattern often called catching a falling knife.
  • Over-risking a single trade. Sizing a position above the 1% to 2% of your account that most educators suggest per trade means a normal losing streak can do outsized damage, however good the entry looks.
  • Rounding shares up. The Position size tab floors the share count on purpose so you never exceed your risk; overriding it upward quietly pushes the money at stake past the amount you set.

Reading these figures as part of a wider risk management routine, rather than as one-off numbers, is what turns the calculator from a convenience into a check on the size of the risk you are taking.

What is the difference between average down and dollar-cost averaging in a stock calculation?

The difference between average down and dollar-cost averaging in a stock calculation is that average down means adding to a position you already hold after its price has fallen, to lower your average cost, while dollar-cost averaging means investing a fixed amount at regular intervals whatever the price. Average down is reactive to a drop and changes the cost basis of an open position; dollar-cost averaging is systematic and price-agnostic, spreading entries over time to remove the timing decision. The Average down tab measures the first; the second is a strategy that a recurring-contribution calculator projects.

AttributeAverage downDollar-cost averaging
What it isAdding shares to a losing position to lower the average costInvesting a fixed amount at set intervals
TriggerA price drop in a stock you already ownA schedule, such as monthly, whatever the price
GoalCut the average cost of an open positionSpread entries and remove market timing
ApproachReactive to priceSystematic and price-agnostic
Where you calculate itAverage down tab: current shares and price, then new shares and priceA recurring contribution and an interval, not this tool

Averaging down can lower the price at which a position recovers, but it concentrates more money into one falling stock, whereas dollar-cost averaging deliberately diversifies your entries across time. Treating a systematic dollar-cost averaging plan as if it were the same reactive move as an average-down is what leads investors to add to a loser and call it a strategy.

Which calculators are related to the stock calculator?

The calculators related to the stock calculator are the dedicated stock and income tools this hub links out to, each owning one calculation the all-in-one page only touches. The calculators related to the stock calculator are listed below:

  • Stock profit calculator: works out a sale's full result with fees on both the buy and sell, capital gains tax, dividends and an annualized return, the deep version of the Profit / ROI tab.
  • Average down calculator: averages unlimited buy lots and adds your break-even and unrealized profit or loss, the deep version of the Average down tab.
  • Percentage gain calculator: gives the plain percentage change between two prices, without shares, fees or a position.
  • Dividend calculator: projects the income a stock pays, turning a share count and a dividend into annual and monthly cash.
  • DRIP calculator: shows how reinvesting those dividends compounds your shares and total return over time.
  • Dividend yield calculator: gives the yield a stock pays relative to its price, and your yield on cost.
  • Risk/reward ratio calculator: pairs the risk from the Position size tab with a profit target to check a trade is worth taking.

Each opens as its own tool, so use this page for a fast profit, average or position size, and the dedicated calculators when you need the depth they are built for.

FAQ

How do I calculate my profit and ROI on shares?

Your profit is (sell price − buy price) × shares, less any fees, and your ROI is that profit divided by your cost basis. Buying 50 shares at $100 and selling at $120 with no fees returns a +$1,000.00 profit and a +20.0% ROI on the $5,000 invested. Add fees and the ROI falls, so include them for a net figure.

How does averaging down change my cost basis?

Averaging down replaces your average with a weighted average of every buy. Holding 100 shares at $50 and adding 100 at $40 gives (100 × $50 + 100 × $40) ÷ 200 = $45.00, a $5.00 drop. The more you buy at the lower price, the more the average falls, but it never drops below your cheapest purchase.

How many shares should I buy for a given risk?

Divide the money you are willing to risk by your per-share risk, which is your entry price minus your stop-loss. Risking 2% of a $10,000 account ($200) with a $5 stop distance buys 40 shares, a $2,000 position, whatever the share price happens to be. Risking more than 1% to 2% of your account per trade is generally considered aggressive.

Does this include fees and taxes?

Not in full. The Profit / ROI tab takes one aggregate fee and no tax, so it shows a gross return. For separate commissions on the buy and the sell, capital gains tax, dividends and an annualized return, the dedicated stock profit calculator is built for the complete picture.

What's the difference between this and the Stock Profit / Average Down calculators?

This page gives fast answers with minimal inputs and acts as the hub for the stock family. The Stock Profit Calculator adds fees on both legs, tax, dividends and an annualized return; the Average Down Calculator adds unlimited buy lots, a fee-adjusted break-even and unrealized profit or loss. Use the tabs to start, the dedicated tools to go deep.

This tool is for education, not financial advice. The value of shares can go down as well as up, and you may get back less than you invest. Always confirm your fees, taxes and your own risk limits before you buy or sell.

Select your language

English (Nigeria) country flag English (Nigeria)