Stock Calculator

Professional Stock Calculator to estimate profit/loss, break-even price, ROI, market value, and dividend impact (with optional reinvestment and taxes). Fast, accessible, and mobile-first.

Full original guide (expanded)

Stock Calculator

Estimate profit or loss, break-even price, ROI, and dividend impact from buy price, shares, fees, and time held. Optional reinvestment and tax assumptions are supported.

Inputs

Dividend input type
Reinvest dividends?
Taxes (optional)

Validation occurs on blur. All currency values are estimates and for informational purposes only.

Results

Net Profit (pre‑tax)
$0.00
ROI (pre‑tax)
0.00%
Break‑even Price
$0.00
Cost Basis (incl. buy fees)
$0.00
Current Shares (incl. reinvested)
0.000000
Market Value
$0.00
Unrealized Gain/Loss (excl. dividends)
$0.00
Dividends Over Period (pre‑tax)
$0.00
Dividends Over Period (after‑tax)
$0.00
Net Proceeds if Sold Now (pre‑tax)
$0.00
Estimated After‑Tax Profit
$0.00
CAGR (pre‑tax)
CAGR (after‑tax)

Taxes are applied to positive capital gains only; dividend taxes are applied whether dividends are reinvested or taken in cash. Reinvestment assumes dividends purchase fractional shares at the current price each year.

Data Source and Methodology

Authoritative source: U.S. Securities and Exchange Commission (SEC), Investor.gov – Compound Interest Calculator and Education Center (2024–2025). Direct link: SEC Investor.gov Compound Interest.

All calculations strictly follow the formulas and data provided by this source.

  • Compounding and growth calculations are aligned with SEC compound interest conventions.
  • Cost basis, break‑even, and profit/loss formulas use standard finance definitions.
  • Dividend reinvestment in this tool assumes purchases at a constant current price for scenario analysis.

The Formula Explained

Cost basis: $$CB = P_0 \cdot N_0 + F_b$$

Break‑even price: $$P_{be} = \frac{CB + F_s}{N_t}$$ where \(N_t\) is shares at time of sale (includes reinvested shares if enabled).

Dividend per share from yield: $$DPS_0 = y \cdot P_c$$

Dividends (no reinvestment, with growth \(g\), years \(T\)): $$D_{tot} = \sum_{i=0}^{\lfloor T \rfloor - 1} N_0 \cdot DPS_0(1+g)^i + \{T\} \cdot N_0 \cdot DPS_0(1+g)^{\lfloor T \rfloor}$$ where \(\{T\}\) is the fractional year.

Reinvested shares (annual, after dividend tax rate \(t_d\)): $$N_t = N_0 \prod_{i=0}^{\lfloor T \rfloor - 1} \left(1 + \frac{DPS_0(1+g)^i (1-t_d)}{P_c}\right)\cdot \left(1 + \{T\}\frac{DPS_0(1+g)^{\lfloor T \rfloor}(1-t_d)}{P_c}\right)$$

Profit pre‑tax (sell at \(P_c\)): $$\Pi_{pre} = P_c \cdot N_t - F_s - CB$$

Profit after‑tax: $$\Pi_{after} = \Pi_{pre} - t_{cg}\cdot \max(\Pi_{pre},0) - t_d \cdot D_{tot}$$

CAGR pre‑tax: $$CAGR = \left(\frac{V_{final}}{CB}\right)^{1/T} - 1,\quad V_{final}=\begin{cases}P_c\cdot N_t - F_s,& \text{reinvest}\\ P_c\cdot N_0 + D_{tot} - F_s,& \text{no reinvest}\end{cases}$$

Glossary of Variables

  • Buy price per share (P0): Price paid per share when buying.
  • Shares (N0): Number of shares purchased.
  • Buy fees (Fb) / Sell fees (Fs): Commissions or transaction fees for buy/sell.
  • Current price (Pc): Price per share used to value/exit the position.
  • Dividend input: Either Yield (%) or Dividend Per Share ($) on an annual basis.
  • Dividend growth (g): Expected annual growth rate in dividends.
  • Holding period (T): Investment horizon in years; fractional years supported.
  • Capital gains tax (tcg): Tax rate applied to positive capital gains at sale.
  • Dividend tax (td): Tax rate applied to dividends (even if reinvested).
  • Cost basis (CB): Total initial cost = buy price × shares + buy fees.
  • Break‑even price (Pbe): Price where total proceeds equal total costs.
  • Market value: Current price × number of shares (includes reinvested shares if enabled).
  • Profit (pre/after‑tax): Gain or loss after fees, optionally after taxes.
  • CAGR: Annualized return over the holding period.

How It Works: A Step‑by‑Step Example

Suppose you bought 50 shares at $120 with $5 buy fees. Current price is $138, sell fees $5. Dividend yield is 2%, dividend growth 5%, holding period 3 years, reinvest dividends, and assume 15% dividend tax and 15% capital gains tax.

  1. Cost basis: CB = 120×50 + 5 = $6,005.
  2. DPS from yield: DPS0 = 0.02 × 138 = $2.76.
  3. Reinvested shares: each year add (after‑tax dividends / price). After 3 years, shares rise from 50 to approximately 50.30.
  4. Market value: 138 × 50.30 ≈ $6,943.8.
  5. Pre‑tax profit: 6,943.8 − 5 − 6,005 ≈ $933.8.
  6. Dividend taxes paid: about 15% of total dividends (~$4.76 per share compounded), reducing after‑tax profit.
  7. After‑tax profit: pre‑tax profit minus capital gains tax on gains (~$140.1) minus dividend taxes (≈$20.9) ≈ $772.8.

Numbers are rounded for readability. Actual results may vary with rounding and dividend schedules.

Frequently Asked Questions (FAQ)

What does “reinvest dividends” change?

It compounds your share count by purchasing fractional shares with after‑tax dividends at the current price. Your market value reflects these extra shares.

Why is dividend yield converted using current price?

Dividend yield is typically quoted as DPS ÷ price. Using the current price aligns with market data conventions and forward estimates.

How are taxes applied?

Capital gains tax applies to positive gains only at sale. Dividend tax applies to dividends regardless of reinvestment and reduces cash available to reinvest.

Does the calculator support fractional years?

Yes. For partial years, dividends scale proportionally and reinvestment includes a proportional final-period top-up.

Can I model commission-free trading?

Set buy and sell fees to $0 to simulate commission-free brokers.

Is the current price required?

Yes. It determines market value, profit/loss, and break‑even computations.

Is this tool financial advice?

No. This is an educational calculator. Do your own research and consult a professional if needed.


Audit: Complete
Formula (LaTeX) + variables + units
This section shows the formulas used by the calculator engine, plus variable definitions and units.
Formula (extracted LaTeX)
\[CB = P_0 \cdot N_0 + F_b\]
CB = P_0 \cdot N_0 + F_b
Formula (extracted LaTeX)
\[P_{be} = \frac{CB + F_s}{N_t}\]
P_{be} = \frac{CB + F_s}{N_t}
Formula (extracted LaTeX)
\[DPS_0 = y \cdot P_c\]
DPS_0 = y \cdot P_c
Formula (extracted LaTeX)
\[D_{tot} = \sum_{i=0}^{\lfloor T \rfloor - 1} N_0 \cdot DPS_0(1+g)^i + \{T\} \cdot N_0 \cdot DPS_0(1+g)^{\lfloor T \rfloor}\]
D_{tot} = \sum_{i=0}^{\lfloor T \rfloor - 1} N_0 \cdot DPS_0(1+g)^i + \{T\} \cdot N_0 \cdot DPS_0(1+g)^{\lfloor T \rfloor}
Formula (extracted LaTeX)
\[N_t = N_0 \prod_{i=0}^{\lfloor T \rfloor - 1} \left(1 + \frac{DPS_0(1+g)^i (1-t_d)}{P_c}\right)\cdot \left(1 + \{T\}\frac{DPS_0(1+g)^{\lfloor T \rfloor}(1-t_d)}{P_c}\right)\]
N_t = N_0 \prod_{i=0}^{\lfloor T \rfloor - 1} \left(1 + \frac{DPS_0(1+g)^i (1-t_d)}{P_c}\right)\cdot \left(1 + \{T\}\frac{DPS_0(1+g)^{\lfloor T \rfloor}(1-t_d)}{P_c}\right)
Formula (extracted LaTeX)
\[\Pi_{pre} = P_c \cdot N_t - F_s - CB\]
\Pi_{pre} = P_c \cdot N_t - F_s - CB
Formula (extracted text)
Cost basis: $CB = P_0 \cdot N_0 + F_b$ Break‑even price: $P_{be} = \frac{CB + F_s}{N_t}$ where \(N_t\) is shares at time of sale (includes reinvested shares if enabled). Dividend per share from yield: $DPS_0 = y \cdot P_c$ Dividends (no reinvestment, with growth \(g\), years \(T\)): $D_{tot} = \sum_{i=0}^{\lfloor T \rfloor - 1} N_0 \cdot DPS_0(1+g)^i + \{T\} \cdot N_0 \cdot DPS_0(1+g)^{\lfloor T \rfloor}$ where \(\{T\}\) is the fractional year. Reinvested shares (annual, after dividend tax rate \(t_d\)): $N_t = N_0 \prod_{i=0}^{\lfloor T \rfloor - 1} \left(1 + \frac{DPS_0(1+g)^i (1-t_d)}{P_c}\right)\cdot \left(1 + \{T\}\frac{DPS_0(1+g)^{\lfloor T \rfloor}(1-t_d)}{P_c}\right)$ Profit pre‑tax (sell at \(P_c\)): $\Pi_{pre} = P_c \cdot N_t - F_s - CB$ Profit after‑tax: $\Pi_{after} = \Pi_{pre} - t_{cg}\cdot \max(\Pi_{pre},0) - t_d \cdot D_{tot}$ CAGR pre‑tax: $CAGR = \left(\frac{V_{final}}{CB}\right)^{1/T} - 1,\quad V_{final}=\begin{cases}P_c\cdot N_t - F_s,& \text{reinvest}\\ P_c\cdot N_0 + D_{tot} - F_s,& \text{no reinvest}\end{cases}$
Variables and units
  • T = property tax (annual or monthly depending on input) (currency)
Sources (authoritative):
Changelog
Version: 0.1.0-draft
Last code update: 2026-01-19
0.1.0-draft · 2026-01-19
  • Initial audit spec draft generated from HTML extraction (review required).
  • Verify formulas match the calculator engine and convert any text-only formulas to LaTeX.
  • Confirm sources are authoritative and relevant to the calculator methodology.
Verified by Ugo Candido on 2026-01-19
Profile · LinkedIn

Stock Calculator

Estimate profit or loss, break-even price, ROI, and dividend impact from buy price, shares, fees, and time held. Optional reinvestment and tax assumptions are supported.

Inputs

Dividend input type
Reinvest dividends?
Taxes (optional)

Validation occurs on blur. All currency values are estimates and for informational purposes only.

Results

Net Profit (pre‑tax)
$0.00
ROI (pre‑tax)
0.00%
Break‑even Price
$0.00
Cost Basis (incl. buy fees)
$0.00
Current Shares (incl. reinvested)
0.000000
Market Value
$0.00
Unrealized Gain/Loss (excl. dividends)
$0.00
Dividends Over Period (pre‑tax)
$0.00
Dividends Over Period (after‑tax)
$0.00
Net Proceeds if Sold Now (pre‑tax)
$0.00
Estimated After‑Tax Profit
$0.00
CAGR (pre‑tax)
CAGR (after‑tax)

Taxes are applied to positive capital gains only; dividend taxes are applied whether dividends are reinvested or taken in cash. Reinvestment assumes dividends purchase fractional shares at the current price each year.

Data Source and Methodology

Authoritative source: U.S. Securities and Exchange Commission (SEC), Investor.gov – Compound Interest Calculator and Education Center (2024–2025). Direct link: SEC Investor.gov Compound Interest.

All calculations strictly follow the formulas and data provided by this source.

  • Compounding and growth calculations are aligned with SEC compound interest conventions.
  • Cost basis, break‑even, and profit/loss formulas use standard finance definitions.
  • Dividend reinvestment in this tool assumes purchases at a constant current price for scenario analysis.

The Formula Explained

Cost basis: $$CB = P_0 \cdot N_0 + F_b$$

Break‑even price: $$P_{be} = \frac{CB + F_s}{N_t}$$ where \(N_t\) is shares at time of sale (includes reinvested shares if enabled).

Dividend per share from yield: $$DPS_0 = y \cdot P_c$$

Dividends (no reinvestment, with growth \(g\), years \(T\)): $$D_{tot} = \sum_{i=0}^{\lfloor T \rfloor - 1} N_0 \cdot DPS_0(1+g)^i + \{T\} \cdot N_0 \cdot DPS_0(1+g)^{\lfloor T \rfloor}$$ where \(\{T\}\) is the fractional year.

Reinvested shares (annual, after dividend tax rate \(t_d\)): $$N_t = N_0 \prod_{i=0}^{\lfloor T \rfloor - 1} \left(1 + \frac{DPS_0(1+g)^i (1-t_d)}{P_c}\right)\cdot \left(1 + \{T\}\frac{DPS_0(1+g)^{\lfloor T \rfloor}(1-t_d)}{P_c}\right)$$

Profit pre‑tax (sell at \(P_c\)): $$\Pi_{pre} = P_c \cdot N_t - F_s - CB$$

Profit after‑tax: $$\Pi_{after} = \Pi_{pre} - t_{cg}\cdot \max(\Pi_{pre},0) - t_d \cdot D_{tot}$$

CAGR pre‑tax: $$CAGR = \left(\frac{V_{final}}{CB}\right)^{1/T} - 1,\quad V_{final}=\begin{cases}P_c\cdot N_t - F_s,& \text{reinvest}\\ P_c\cdot N_0 + D_{tot} - F_s,& \text{no reinvest}\end{cases}$$

Glossary of Variables

  • Buy price per share (P0): Price paid per share when buying.
  • Shares (N0): Number of shares purchased.
  • Buy fees (Fb) / Sell fees (Fs): Commissions or transaction fees for buy/sell.
  • Current price (Pc): Price per share used to value/exit the position.
  • Dividend input: Either Yield (%) or Dividend Per Share ($) on an annual basis.
  • Dividend growth (g): Expected annual growth rate in dividends.
  • Holding period (T): Investment horizon in years; fractional years supported.
  • Capital gains tax (tcg): Tax rate applied to positive capital gains at sale.
  • Dividend tax (td): Tax rate applied to dividends (even if reinvested).
  • Cost basis (CB): Total initial cost = buy price × shares + buy fees.
  • Break‑even price (Pbe): Price where total proceeds equal total costs.
  • Market value: Current price × number of shares (includes reinvested shares if enabled).
  • Profit (pre/after‑tax): Gain or loss after fees, optionally after taxes.
  • CAGR: Annualized return over the holding period.

How It Works: A Step‑by‑Step Example

Suppose you bought 50 shares at $120 with $5 buy fees. Current price is $138, sell fees $5. Dividend yield is 2%, dividend growth 5%, holding period 3 years, reinvest dividends, and assume 15% dividend tax and 15% capital gains tax.

  1. Cost basis: CB = 120×50 + 5 = $6,005.
  2. DPS from yield: DPS0 = 0.02 × 138 = $2.76.
  3. Reinvested shares: each year add (after‑tax dividends / price). After 3 years, shares rise from 50 to approximately 50.30.
  4. Market value: 138 × 50.30 ≈ $6,943.8.
  5. Pre‑tax profit: 6,943.8 − 5 − 6,005 ≈ $933.8.
  6. Dividend taxes paid: about 15% of total dividends (~$4.76 per share compounded), reducing after‑tax profit.
  7. After‑tax profit: pre‑tax profit minus capital gains tax on gains (~$140.1) minus dividend taxes (≈$20.9) ≈ $772.8.

Numbers are rounded for readability. Actual results may vary with rounding and dividend schedules.

Frequently Asked Questions (FAQ)

What does “reinvest dividends” change?

It compounds your share count by purchasing fractional shares with after‑tax dividends at the current price. Your market value reflects these extra shares.

Why is dividend yield converted using current price?

Dividend yield is typically quoted as DPS ÷ price. Using the current price aligns with market data conventions and forward estimates.

How are taxes applied?

Capital gains tax applies to positive gains only at sale. Dividend tax applies to dividends regardless of reinvestment and reduces cash available to reinvest.

Does the calculator support fractional years?

Yes. For partial years, dividends scale proportionally and reinvestment includes a proportional final-period top-up.

Can I model commission-free trading?

Set buy and sell fees to $0 to simulate commission-free brokers.

Is the current price required?

Yes. It determines market value, profit/loss, and break‑even computations.

Is this tool financial advice?

No. This is an educational calculator. Do your own research and consult a professional if needed.


Audit: Complete
Formula (LaTeX) + variables + units
This section shows the formulas used by the calculator engine, plus variable definitions and units.
Formula (extracted LaTeX)
\[CB = P_0 \cdot N_0 + F_b\]
CB = P_0 \cdot N_0 + F_b
Formula (extracted LaTeX)
\[P_{be} = \frac{CB + F_s}{N_t}\]
P_{be} = \frac{CB + F_s}{N_t}
Formula (extracted LaTeX)
\[DPS_0 = y \cdot P_c\]
DPS_0 = y \cdot P_c
Formula (extracted LaTeX)
\[D_{tot} = \sum_{i=0}^{\lfloor T \rfloor - 1} N_0 \cdot DPS_0(1+g)^i + \{T\} \cdot N_0 \cdot DPS_0(1+g)^{\lfloor T \rfloor}\]
D_{tot} = \sum_{i=0}^{\lfloor T \rfloor - 1} N_0 \cdot DPS_0(1+g)^i + \{T\} \cdot N_0 \cdot DPS_0(1+g)^{\lfloor T \rfloor}
Formula (extracted LaTeX)
\[N_t = N_0 \prod_{i=0}^{\lfloor T \rfloor - 1} \left(1 + \frac{DPS_0(1+g)^i (1-t_d)}{P_c}\right)\cdot \left(1 + \{T\}\frac{DPS_0(1+g)^{\lfloor T \rfloor}(1-t_d)}{P_c}\right)\]
N_t = N_0 \prod_{i=0}^{\lfloor T \rfloor - 1} \left(1 + \frac{DPS_0(1+g)^i (1-t_d)}{P_c}\right)\cdot \left(1 + \{T\}\frac{DPS_0(1+g)^{\lfloor T \rfloor}(1-t_d)}{P_c}\right)
Formula (extracted LaTeX)
\[\Pi_{pre} = P_c \cdot N_t - F_s - CB\]
\Pi_{pre} = P_c \cdot N_t - F_s - CB
Formula (extracted text)
Cost basis: $CB = P_0 \cdot N_0 + F_b$ Break‑even price: $P_{be} = \frac{CB + F_s}{N_t}$ where \(N_t\) is shares at time of sale (includes reinvested shares if enabled). Dividend per share from yield: $DPS_0 = y \cdot P_c$ Dividends (no reinvestment, with growth \(g\), years \(T\)): $D_{tot} = \sum_{i=0}^{\lfloor T \rfloor - 1} N_0 \cdot DPS_0(1+g)^i + \{T\} \cdot N_0 \cdot DPS_0(1+g)^{\lfloor T \rfloor}$ where \(\{T\}\) is the fractional year. Reinvested shares (annual, after dividend tax rate \(t_d\)): $N_t = N_0 \prod_{i=0}^{\lfloor T \rfloor - 1} \left(1 + \frac{DPS_0(1+g)^i (1-t_d)}{P_c}\right)\cdot \left(1 + \{T\}\frac{DPS_0(1+g)^{\lfloor T \rfloor}(1-t_d)}{P_c}\right)$ Profit pre‑tax (sell at \(P_c\)): $\Pi_{pre} = P_c \cdot N_t - F_s - CB$ Profit after‑tax: $\Pi_{after} = \Pi_{pre} - t_{cg}\cdot \max(\Pi_{pre},0) - t_d \cdot D_{tot}$ CAGR pre‑tax: $CAGR = \left(\frac{V_{final}}{CB}\right)^{1/T} - 1,\quad V_{final}=\begin{cases}P_c\cdot N_t - F_s,& \text{reinvest}\\ P_c\cdot N_0 + D_{tot} - F_s,& \text{no reinvest}\end{cases}$
Variables and units
  • T = property tax (annual or monthly depending on input) (currency)
Sources (authoritative):
Changelog
Version: 0.1.0-draft
Last code update: 2026-01-19
0.1.0-draft · 2026-01-19
  • Initial audit spec draft generated from HTML extraction (review required).
  • Verify formulas match the calculator engine and convert any text-only formulas to LaTeX.
  • Confirm sources are authoritative and relevant to the calculator methodology.
Verified by Ugo Candido on 2026-01-19
Profile · LinkedIn

Stock Calculator

Estimate profit or loss, break-even price, ROI, and dividend impact from buy price, shares, fees, and time held. Optional reinvestment and tax assumptions are supported.

Inputs

Dividend input type
Reinvest dividends?
Taxes (optional)

Validation occurs on blur. All currency values are estimates and for informational purposes only.

Results

Net Profit (pre‑tax)
$0.00
ROI (pre‑tax)
0.00%
Break‑even Price
$0.00
Cost Basis (incl. buy fees)
$0.00
Current Shares (incl. reinvested)
0.000000
Market Value
$0.00
Unrealized Gain/Loss (excl. dividends)
$0.00
Dividends Over Period (pre‑tax)
$0.00
Dividends Over Period (after‑tax)
$0.00
Net Proceeds if Sold Now (pre‑tax)
$0.00
Estimated After‑Tax Profit
$0.00
CAGR (pre‑tax)
CAGR (after‑tax)

Taxes are applied to positive capital gains only; dividend taxes are applied whether dividends are reinvested or taken in cash. Reinvestment assumes dividends purchase fractional shares at the current price each year.

Data Source and Methodology

Authoritative source: U.S. Securities and Exchange Commission (SEC), Investor.gov – Compound Interest Calculator and Education Center (2024–2025). Direct link: SEC Investor.gov Compound Interest.

All calculations strictly follow the formulas and data provided by this source.

  • Compounding and growth calculations are aligned with SEC compound interest conventions.
  • Cost basis, break‑even, and profit/loss formulas use standard finance definitions.
  • Dividend reinvestment in this tool assumes purchases at a constant current price for scenario analysis.

The Formula Explained

Cost basis: $$CB = P_0 \cdot N_0 + F_b$$

Break‑even price: $$P_{be} = \frac{CB + F_s}{N_t}$$ where \(N_t\) is shares at time of sale (includes reinvested shares if enabled).

Dividend per share from yield: $$DPS_0 = y \cdot P_c$$

Dividends (no reinvestment, with growth \(g\), years \(T\)): $$D_{tot} = \sum_{i=0}^{\lfloor T \rfloor - 1} N_0 \cdot DPS_0(1+g)^i + \{T\} \cdot N_0 \cdot DPS_0(1+g)^{\lfloor T \rfloor}$$ where \(\{T\}\) is the fractional year.

Reinvested shares (annual, after dividend tax rate \(t_d\)): $$N_t = N_0 \prod_{i=0}^{\lfloor T \rfloor - 1} \left(1 + \frac{DPS_0(1+g)^i (1-t_d)}{P_c}\right)\cdot \left(1 + \{T\}\frac{DPS_0(1+g)^{\lfloor T \rfloor}(1-t_d)}{P_c}\right)$$

Profit pre‑tax (sell at \(P_c\)): $$\Pi_{pre} = P_c \cdot N_t - F_s - CB$$

Profit after‑tax: $$\Pi_{after} = \Pi_{pre} - t_{cg}\cdot \max(\Pi_{pre},0) - t_d \cdot D_{tot}$$

CAGR pre‑tax: $$CAGR = \left(\frac{V_{final}}{CB}\right)^{1/T} - 1,\quad V_{final}=\begin{cases}P_c\cdot N_t - F_s,& \text{reinvest}\\ P_c\cdot N_0 + D_{tot} - F_s,& \text{no reinvest}\end{cases}$$

Glossary of Variables

  • Buy price per share (P0): Price paid per share when buying.
  • Shares (N0): Number of shares purchased.
  • Buy fees (Fb) / Sell fees (Fs): Commissions or transaction fees for buy/sell.
  • Current price (Pc): Price per share used to value/exit the position.
  • Dividend input: Either Yield (%) or Dividend Per Share ($) on an annual basis.
  • Dividend growth (g): Expected annual growth rate in dividends.
  • Holding period (T): Investment horizon in years; fractional years supported.
  • Capital gains tax (tcg): Tax rate applied to positive capital gains at sale.
  • Dividend tax (td): Tax rate applied to dividends (even if reinvested).
  • Cost basis (CB): Total initial cost = buy price × shares + buy fees.
  • Break‑even price (Pbe): Price where total proceeds equal total costs.
  • Market value: Current price × number of shares (includes reinvested shares if enabled).
  • Profit (pre/after‑tax): Gain or loss after fees, optionally after taxes.
  • CAGR: Annualized return over the holding period.

How It Works: A Step‑by‑Step Example

Suppose you bought 50 shares at $120 with $5 buy fees. Current price is $138, sell fees $5. Dividend yield is 2%, dividend growth 5%, holding period 3 years, reinvest dividends, and assume 15% dividend tax and 15% capital gains tax.

  1. Cost basis: CB = 120×50 + 5 = $6,005.
  2. DPS from yield: DPS0 = 0.02 × 138 = $2.76.
  3. Reinvested shares: each year add (after‑tax dividends / price). After 3 years, shares rise from 50 to approximately 50.30.
  4. Market value: 138 × 50.30 ≈ $6,943.8.
  5. Pre‑tax profit: 6,943.8 − 5 − 6,005 ≈ $933.8.
  6. Dividend taxes paid: about 15% of total dividends (~$4.76 per share compounded), reducing after‑tax profit.
  7. After‑tax profit: pre‑tax profit minus capital gains tax on gains (~$140.1) minus dividend taxes (≈$20.9) ≈ $772.8.

Numbers are rounded for readability. Actual results may vary with rounding and dividend schedules.

Frequently Asked Questions (FAQ)

What does “reinvest dividends” change?

It compounds your share count by purchasing fractional shares with after‑tax dividends at the current price. Your market value reflects these extra shares.

Why is dividend yield converted using current price?

Dividend yield is typically quoted as DPS ÷ price. Using the current price aligns with market data conventions and forward estimates.

How are taxes applied?

Capital gains tax applies to positive gains only at sale. Dividend tax applies to dividends regardless of reinvestment and reduces cash available to reinvest.

Does the calculator support fractional years?

Yes. For partial years, dividends scale proportionally and reinvestment includes a proportional final-period top-up.

Can I model commission-free trading?

Set buy and sell fees to $0 to simulate commission-free brokers.

Is the current price required?

Yes. It determines market value, profit/loss, and break‑even computations.

Is this tool financial advice?

No. This is an educational calculator. Do your own research and consult a professional if needed.


Audit: Complete
Formula (LaTeX) + variables + units
This section shows the formulas used by the calculator engine, plus variable definitions and units.
Formula (extracted LaTeX)
\[CB = P_0 \cdot N_0 + F_b\]
CB = P_0 \cdot N_0 + F_b
Formula (extracted LaTeX)
\[P_{be} = \frac{CB + F_s}{N_t}\]
P_{be} = \frac{CB + F_s}{N_t}
Formula (extracted LaTeX)
\[DPS_0 = y \cdot P_c\]
DPS_0 = y \cdot P_c
Formula (extracted LaTeX)
\[D_{tot} = \sum_{i=0}^{\lfloor T \rfloor - 1} N_0 \cdot DPS_0(1+g)^i + \{T\} \cdot N_0 \cdot DPS_0(1+g)^{\lfloor T \rfloor}\]
D_{tot} = \sum_{i=0}^{\lfloor T \rfloor - 1} N_0 \cdot DPS_0(1+g)^i + \{T\} \cdot N_0 \cdot DPS_0(1+g)^{\lfloor T \rfloor}
Formula (extracted LaTeX)
\[N_t = N_0 \prod_{i=0}^{\lfloor T \rfloor - 1} \left(1 + \frac{DPS_0(1+g)^i (1-t_d)}{P_c}\right)\cdot \left(1 + \{T\}\frac{DPS_0(1+g)^{\lfloor T \rfloor}(1-t_d)}{P_c}\right)\]
N_t = N_0 \prod_{i=0}^{\lfloor T \rfloor - 1} \left(1 + \frac{DPS_0(1+g)^i (1-t_d)}{P_c}\right)\cdot \left(1 + \{T\}\frac{DPS_0(1+g)^{\lfloor T \rfloor}(1-t_d)}{P_c}\right)
Formula (extracted LaTeX)
\[\Pi_{pre} = P_c \cdot N_t - F_s - CB\]
\Pi_{pre} = P_c \cdot N_t - F_s - CB
Formula (extracted text)
Cost basis: $CB = P_0 \cdot N_0 + F_b$ Break‑even price: $P_{be} = \frac{CB + F_s}{N_t}$ where \(N_t\) is shares at time of sale (includes reinvested shares if enabled). Dividend per share from yield: $DPS_0 = y \cdot P_c$ Dividends (no reinvestment, with growth \(g\), years \(T\)): $D_{tot} = \sum_{i=0}^{\lfloor T \rfloor - 1} N_0 \cdot DPS_0(1+g)^i + \{T\} \cdot N_0 \cdot DPS_0(1+g)^{\lfloor T \rfloor}$ where \(\{T\}\) is the fractional year. Reinvested shares (annual, after dividend tax rate \(t_d\)): $N_t = N_0 \prod_{i=0}^{\lfloor T \rfloor - 1} \left(1 + \frac{DPS_0(1+g)^i (1-t_d)}{P_c}\right)\cdot \left(1 + \{T\}\frac{DPS_0(1+g)^{\lfloor T \rfloor}(1-t_d)}{P_c}\right)$ Profit pre‑tax (sell at \(P_c\)): $\Pi_{pre} = P_c \cdot N_t - F_s - CB$ Profit after‑tax: $\Pi_{after} = \Pi_{pre} - t_{cg}\cdot \max(\Pi_{pre},0) - t_d \cdot D_{tot}$ CAGR pre‑tax: $CAGR = \left(\frac{V_{final}}{CB}\right)^{1/T} - 1,\quad V_{final}=\begin{cases}P_c\cdot N_t - F_s,& \text{reinvest}\\ P_c\cdot N_0 + D_{tot} - F_s,& \text{no reinvest}\end{cases}$
Variables and units
  • T = property tax (annual or monthly depending on input) (currency)
Sources (authoritative):
Changelog
Version: 0.1.0-draft
Last code update: 2026-01-19
0.1.0-draft · 2026-01-19
  • Initial audit spec draft generated from HTML extraction (review required).
  • Verify formulas match the calculator engine and convert any text-only formulas to LaTeX.
  • Confirm sources are authoritative and relevant to the calculator methodology.
Verified by Ugo Candido on 2026-01-19
Profile · LinkedIn
Formulas

(Formulas preserved from original page content, if present.)

Version 0.1.0-draft
Citations

Add authoritative sources relevant to this calculator (standards bodies, manuals, official docs).

Changelog
  • 0.1.0-draft — 2026-01-19: Initial draft (review required).