Share Calculator for Stocks & Investments
Use this Share Calculator to calculate stock profit or loss, return on investment, average share cost, maximum shares you can buy, break-even price, dividend income, dividend yield, target price, target profit, portfolio allocation, and stock split adjustments. Core formulas include \(\text{Profit}=(\text{Sell Price}-\text{Buy Price})\times\text{Shares}\), \(\text{ROI %}=\frac{\text{Net Profit}}{\text{Total Cost}}\times100\), and \(\text{Average Cost}=\frac{\text{Total Investment}}{\text{Total Shares}}\).
Calculate Shares, Profit, ROI and Investment Cost
Select a mode, enter your stock or investment details, and calculate. The tool supports whole-share planning, average cost after new purchases, dividend income, target price, portfolio allocation, and stock split math.
Stock Profit / Loss Calculator
Maximum Shares You Can Buy
Estimate how many whole shares you can buy from a budget after fees and a cash reserve.
Average Share Cost Calculator
Calculate the new weighted average cost after buying more shares.
Dividend Income and Yield Calculator
Estimate annual dividend income, yield on cost, current dividend yield, and payout-based income.
Target Price and Required Return Calculator
Find the target sell price needed to reach a desired profit or return.
Portfolio Allocation Calculator
Enter one holding per line in this format: Ticker or Name, Shares, Price per Share.
Stock Split and Reverse Split Calculator
Adjust shares and price for a stock split. Total market value is unchanged before fees and market movement.
Formula Steps and Investment Breakdown
Copyable Share Calculation Summary
What Is a Share Calculator?
A Share Calculator for Stocks & Investments is a financial math tool that helps investors calculate share cost, investment value, profit or loss, return on investment, average cost per share, dividend income, target price, and portfolio allocation. Shares represent ownership units in a company, fund, trust, or other listed security. When someone buys shares, the investment result depends on how many shares were bought, the purchase price, the current or selling price, fees, dividends, and taxes. This calculator brings those inputs into one place so the numbers are easier to understand.
For a basic stock position, the most important values are the number of shares, buy price, sell price or current price, and transaction costs. If the sell price is above the buy price, the position has a capital gain before fees and taxes. If the sell price is below the buy price, the position has a capital loss. Dividends can increase total return because they add income beyond price change. Fees and taxes reduce total return because they lower the amount kept by the investor.
This calculator is useful for beginners learning investment math, students studying personal finance, writers creating educational examples, long-term investors tracking average cost, dividend investors estimating income, and anyone comparing buy or sell scenarios. It does not predict market direction, recommend stocks, or fetch live market data. It works only with the numbers entered by the user.
The tool includes several modes. The profit/loss mode calculates return on a share position. The buy shares mode estimates how many shares can be purchased from a budget. The average cost mode calculates the new weighted average after buying more shares. The dividend mode estimates annual income and yield. The target mode calculates the price needed to reach a desired profit or return. The allocation mode shows how a simple portfolio is distributed across holdings. The split mode adjusts shares and price after a stock split or reverse split.
How to Use This Share Calculator
Use the Profit / Loss tab when you want to know how much money a position has gained or lost. Enter the number of shares, buy price, current or sell price, fees, dividends, and any tax rate you want to model. The calculator returns total cost, sale value, dividend income, gross profit, estimated tax, net profit, return on investment, and break-even price.
Use the Buy Shares tab when you have a fixed investment budget. Enter your budget, share price, fixed fee, percentage fee, cash reserve, and whether fractional shares are allowed. The calculator estimates the maximum shares you can buy, total investment cost, remaining cash, and average cost including fees. This is useful before placing an order because fees and reserves can change how many shares are affordable.
Use the Average Cost tab when you already own shares and plan to buy more. Enter your current shares, current average cost, new shares, new buy price, and fee. The calculator shows your new total shares, total investment, weighted average cost, unrealized profit or loss at the optional current market price, and break-even cost per share.
Use the Dividends tab when income matters. Enter shares held, average cost, current price, dividend per share per payment, payment frequency, and tax rate. The tool calculates annual gross dividend income, estimated tax, net dividend income, yield on cost, and current dividend yield. These numbers are mathematical estimates based on the dividend input; real dividends can change.
Use the Target Price tab to plan outcomes. You can choose a target ROI percentage, a target total profit, or a known target price. The calculator estimates the target sell price, total value, profit, ROI, and the role of fees, dividends, and tax. This mode is for scenario planning, not prediction.
Use the Portfolio Allocation tab to enter holdings in a simple line format. It calculates each holding’s value and percentage weight. Use the Stock Split tab to adjust shares, share price, and average cost after a split or reverse split.
Share Profit Formula
The basic share profit formula compares the selling value with the purchase value:
If 100 shares are bought at 25 and later sold at 32, the price gain is 7 per share. The basic profit is \(7\times100=700\). This simple formula is useful, but it does not include commissions, platform fees, taxes, or dividends. A more complete estimate uses total cost and net sale proceeds:
Total cost includes the purchase value and buy-side fees. Sale proceeds include the sale value minus sell-side fees. Dividend income is added because it is part of total return. Estimated tax is subtracted only as a mathematical scenario; actual tax rules depend on the investor’s country, account type, holding period, and other personal factors.
Return on Investment Formula
Return on investment, or ROI, expresses profit as a percentage of the amount invested:
ROI is helpful because it makes positions of different sizes easier to compare. A 500 profit on a 2,000 investment is a 25% ROI. A 500 profit on a 10,000 investment is a 5% ROI. The cash profit is the same, but the efficiency of capital is different. This is why both currency profit and percentage return matter.
ROI can be positive, negative, or zero. Positive ROI means the investment value and income exceeded the cost. Negative ROI means the result was a loss after the selected adjustments. Zero ROI means the investment broke even. ROI does not automatically show how long the capital was invested. A 10% gain in one month and a 10% gain in five years have very different annualized meanings. This calculator focuses on the core position ROI, not annualized return.
Average Share Cost Formula
Average cost per share is a weighted average. It is not the average of two prices unless the share quantities are equal. The formula is:
When adding new shares to an existing position, the formula becomes:
For example, if an investor owns 100 shares at an average cost of 25 and buys 50 more shares at 20 with a 2 fee, the old cost is 2,500. The new purchase cost is 1,000 plus the 2 fee. The total shares become 150. The new average cost is \(3502/150=23.35\). The average cost moves down because the new purchase price is lower than the old average.
Average cost is useful for understanding break-even level. If the market price is above average cost, the position has an unrealized gain before exit fees and tax. If the market price is below average cost, the position has an unrealized loss. Average cost should not be used alone to decide whether to buy more. A lower average cost does not make a weak investment stronger by itself. The quality, risk, valuation, and purpose of the investment still matter.
Maximum Shares Formula
When investing from a fixed budget, the number of shares depends on share price and fees. For whole shares, the calculator uses a floor function because partial shares are not allowed in that mode:
The floor symbol means the result is rounded down to the nearest whole share. If the calculation gives 101.8 shares, the whole-share result is 101 shares. This avoids exceeding the budget. If fractional shares are allowed, the calculator can estimate fractional shares by dividing the available amount by the fee-adjusted price per share.
Remaining cash is also important. An investor may intentionally keep a reserve to avoid using the full budget. The reserve can represent emergency cash, planned fees, future contributions, or a safety buffer. The calculator separates reserve from leftover cash. Reserve is planned cash not used for the purchase; leftover cash is the amount that remains because the share quantity and fees did not exactly match the budget.
Break-even Price for Shares
Break-even price is the approximate price per share needed to avoid a loss after selected fees and income. Without fees or dividends, break-even price equals buy price. With fees, the break-even price is higher because transaction costs must be recovered. With dividends, the break-even price may be lower because dividends offset part of the cost.
If percentage exit fees are used, the break-even price must account for the fact that the fee grows with the sell price. The calculator adjusts for the selected percentage fee where possible. Break-even price is useful because it answers a practical question: “What price do I need to get back to zero?” It should not be confused with fair value, target price, or a recommendation.
Dividend Income and Yield
Dividend income is cash paid by a company, fund, or trust to shareholders. Not all shares pay dividends, and dividends can be increased, reduced, paused, or cancelled. This calculator treats the dividend input as a mathematical scenario.
Dividend yield compares annual dividend per share to current share price:
Yield on cost compares annual dividend per share to the investor’s average cost:
Current yield and yield on cost answer different questions. Current yield shows the yield based on today’s price. Yield on cost shows income relative to the investor’s original or average cost. A high yield is not automatically better; it may reflect higher risk, price decline, or uncertainty about future payments.
Target Price and Required Return Planning
A target price calculation works backward from a desired result. If you know the number of shares, average cost, desired ROI, dividends, fees, and tax scenario, the calculator can estimate the target selling price needed. This does not predict that the price will happen. It simply converts a goal into a required price.
Target planning is useful when comparing possible outcomes. For example, an investor can ask how much a stock must rise to produce a 20% gain, how much profit a known target price would create, or how dividends reduce the required price. It is also helpful for understanding risk and reward. If a required target price is far above a realistic scenario, the goal may be too aggressive for that position.
Portfolio Allocation
Portfolio allocation shows how much of a portfolio is held in each position. The value of each holding is calculated as shares multiplied by price:
The allocation weight is:
Allocation is important because portfolio risk is not only about individual stocks. A small holding may have limited impact, while one oversized holding can dominate the portfolio’s movement. The allocation calculator does not evaluate quality or risk, but it shows concentration clearly. If one holding is 60% of the portfolio, that holding will heavily influence portfolio performance.
Stock Split and Reverse Split Math
A stock split changes the number of shares and the price per share in the opposite direction. In a 2-for-1 split, one old share becomes two new shares, and the price per share is typically adjusted to half, ignoring market movement. Total value is unchanged by the split itself.
A reverse split does the opposite. In a 1-for-5 reverse split, five old shares become one new share, and the adjusted price is multiplied by five. The calculator lets you enter the split ratio and calculates adjusted shares, adjusted price, adjusted average cost, and total value.
Fees and Taxes in Share Calculations
Fees can appear as fixed commissions, percentage platform fees, currency conversion costs, spread costs, fund charges, and account charges. This calculator includes fixed buy fees, fixed sell fees, and a percentage fee scenario. It does not model every possible broker or product charge. When using the calculator for real planning, enter the closest fee estimate you can.
Taxes are more complex. Capital gains tax, dividend tax, withholding tax, account exemptions, holding periods, losses, and local rules vary widely. For this reason, the tax input is a simple mathematical estimate on positive profit or dividend income. It helps illustrate the effect of tax, but it should not be treated as legal or accounting guidance.
Common Share Calculation Mistakes
The first common mistake is ignoring fees. A small fixed fee may not matter much on a large purchase, but it can meaningfully affect a small purchase. The second mistake is confusing price gain with total return. Dividends can add return, while taxes and fees reduce return. The third mistake is using a simple average instead of a weighted average cost. Buying 10 shares at one price and 100 shares at another price does not make both prices equally important.
The fourth mistake is assuming break-even equals buy price. If fees exist, break-even usually differs from buy price. The fifth mistake is reading ROI without considering time. A 20% gain over a short period and a 20% gain over many years are not equivalent. The sixth mistake is thinking a stock split creates value by itself. A split changes share count and price per share but does not automatically increase total ownership value.
The seventh mistake is treating target price as prediction. A target calculation is only a required price for a selected outcome. It does not say whether the market will reach that price. The eighth mistake is ignoring concentration. A portfolio can look diversified by number of holdings but still be concentrated if one holding is much larger than the rest.
Worked Examples
Example 1: Stock profit. An investor buys 100 shares at 25 and sells at 32:
Example 2: ROI. If the total cost is 2,500 and the net profit is 700:
Example 3: Maximum shares. With a 5,000 budget, 100 reserve, 1 fixed fee, 0.1% fee, and 48 share price, the calculator first reduces the budget by reserve and fixed fee. Then it divides by the fee-adjusted share price and rounds down if whole shares are required.
Example 4: Average cost. An investor owns 100 shares at 25 and buys 50 more at 20 with a 2 fee:
Example 5: Dividend income. If an investor holds 200 shares and receives 0.50 per share quarterly, annual dividend income is \(200\times0.50\times4=400\). If the current share price is 50, the annual dividend per share is 2.00 and the current yield is \(2/50\times100=4\%\).
Share Calculator FAQs
What does this Share Calculator do?
It calculates stock profit or loss, ROI, average cost, maximum shares affordable, break-even price, dividend income, target price, portfolio allocation, and stock split adjustments.
What is the formula for stock profit?
The basic formula is \(\text{Profit}=(\text{Sell Price}-\text{Buy Price})\times\text{Shares}\). A more complete result also includes fees, dividends, and tax estimates.
How do I calculate ROI on shares?
Use \(\text{ROI \%}=\frac{\text{Net Profit}}{\text{Total Cost}}\times100\).
How do I calculate average share cost?
Use \(\text{Average Cost}=\frac{\text{Total Investment Cost}}{\text{Total Shares}}\). For additional purchases, add old cost, new purchase cost, and fees, then divide by total shares.
How many shares can I buy?
The calculator divides your available budget by the fee-adjusted share price. If whole shares are selected, it rounds down to avoid exceeding the budget.
What is break-even price?
Break-even price is the approximate share price needed to recover total cost after selected fees and income assumptions.
Does this calculator use live stock prices?
No. It uses only the numbers you enter. It does not fetch live market prices.
Can this calculator handle dividends?
Yes. It can calculate gross annual dividend income, estimated tax, net dividend income, yield on cost, and current dividend yield.
Does a stock split change total value?
A split changes share count and price per share, but the split itself does not change total value before market movement or fees.
Is this investment advice?
No. This is a mathematical calculator for education and planning. It does not recommend buying, selling, or holding any investment.
Important Note
This Share Calculator is for education, financial math, and investment scenario planning. It is not investment advice, tax advice, legal advice, accounting advice, or a recommendation to buy or sell any stock, fund, ETF, cryptocurrency, bond, or financial product. Actual investment outcomes depend on market movement, fees, tax rules, currency changes, liquidity, risk, and personal circumstances.
