Investment Gain Loss Calculator
How to Use This Calculator
- 1
Enter the original investment and current value
Enter the purchase amount in Initial Investment ($) and the current market value in Current Value ($). Use the value before selling unless you have already completed the sale.
- 2
Add holding period, costs, and distributions
Enter Holding Period (years), Fees & Commissions ($), and Dividends Received ($). The calculator includes fees in cost basis and dividends in total return.
- 3
Review return and tax estimates
Check Total Gain or Loss, Annualized Return, Cost Basis, and the tax estimate. The tax cards use simplified rates and are not a calculation of your actual tax liability.
Example Calculation
An investor bought an investment for $25,000, paid $150 in fees, received $2,000 in dividends, and now holds an investment worth $38,500 after four years.
Initial Investment ($)
25,000
Current Value ($)
38,500
Holding Period (years)
4
Fees & Commissions ($)
150
Dividends Received ($)
2,000
Results
Total Gain
$15,350.00
Annualized Return
12.66%
Current Value
$38,500.00
Cost Basis
$25,150.00
Tax Estimate (Long-Term)
$3,070.00
After-Tax Gain
$12,280.00
Insights card shows the estimated year-by-year value path.
Tips
Fees of $500 instead of $150 reduce the calculated gain by $350
Change Fees & Commissions ($) from 150 to 500. Cost basis rises by $350, reducing the calculated gain by the same amount while the current value and dividends stay unchanged.
A $1,000 dividend changes total return by $1,000
Change Dividends Received ($) from 2,000 to 3,000. The calculator adds the extra distribution to total return; it does not model whether dividends were reinvested or their dates.
A one-year holding period changes the annualized figure
Change Holding Period (years) from 4 to 1. The same overall gain is spread across a shorter period, so the annualized return changes. Use the result as a rate comparison, not a tax classification.
What this calculator estimates
Investment gain or loss compares an investment’s value with its cost basis and can include dividends received during the holding period. This calculator also estimates annualized return and applies simplified tax rates; its tax outputs are not a substitute for determining taxable gain under the rules that apply to your transactions.
How the calculation works
Cost basis = Initial investment + Fees and commissions
Total return = Current value − Cost basis + Dividends received
Percent return = Total return ÷ Cost basis × 100
Annualized return = ((Current value + Dividends) ÷ Cost basis)^(1 ÷ years) − 1
The example’s cost basis is $25,000 + $150 = $25,150. Its total return is $38,500 − $25,150 + $2,000 = $15,350, and its percentage return is $15,350 ÷ $25,150 × 100 = 61.04%.
The annualized formula uses the ending value plus dividends relative to cost basis: ($38,500 + $2,000) ÷ $25,150 = 1.6107. Raising that ratio to the power of 1 ÷ 4 and subtracting 1 gives an annualized return of about 12.66%. This calculation treats dividends as part of the ending value; it does not model when they were paid or whether they were reinvested.
How costs and distributions change the result
The table holds the initial investment, current value, and four-year period constant while changing fees or dividends.
| Scenario | Cost basis | Total return |
|---|---|---|
| $150 fees and $2,000 dividends | $25,150 | $15,350 |
| $500 fees and $2,000 dividends | $25,500 | $15,000 |
| $150 fees and $3,000 dividends | $25,150 | $16,350 |
Include transaction costs consistently, and distinguish dividends received from dividends already reflected in the current market value. The calculator adds dividends to return; it does not add them to the current value or calculate reinvestment growth.
Tax estimates are not tax determinations
The calculator’s tax cards apply a 20% long-term estimate to positive total return and compare it with a simplified 37% short-term rate. Actual tax may differ because federal rates depend on the applicable tax rules and a taxpayer’s circumstances; state taxes and special asset-specific rules are not modeled. The IRS capital gains and losses guidance explains how realized gains and losses are generally treated.
The calculator’s holding-period input affects annualized return and the wording of its tax estimate, but it does not establish the tax treatment of a particular sale. Check the asset’s purchase and sale dates, eligible basis adjustments, and whether the transaction has been realized before using the output for tax planning. For loss carryovers, use the capital gain loss carryover calculator; to combine multiple positions, use the net capital gain/loss calculator.
When to use a different calculator
- Combine realized gains and losses from multiple investments → net capital gain/loss calculator
- Estimate how an unused capital loss carries forward → capital gain loss carryover calculator
- Calculate a portfolio’s gain or loss percentage → portfolio gain/loss percentage calculator
- Model investment growth with a starting amount and assumed return → investment calculator
Before reporting a gain or loss, reconcile the calculation with brokerage statements and transaction records. Cost basis can require adjustments, and the calculator does not determine which fees or distributions qualify for a particular tax treatment.
Frequently Asked Questions
How do I calculate an investment gain or loss?
1. Add eligible purchase costs to the initial investment to find cost basis. 2. Subtract cost basis from current value. 3. Add dividends or distributions if you want total return. In this calculator, $38,500 − ($25,000 + $150) + $2,000 = $15,350.
What is the difference between total return and annualized return?
Total return measures the overall gain or loss during the holding period, while annualized return expresses growth as a compounded yearly rate. Annualized return helps compare investments held for different lengths of time, but it does not describe the path of returns between purchase and sale.
Does this calculator give my actual capital gains tax?
No, its tax estimates apply simplified 37% and 20% rates to positive total return and do not determine your tax bill. Actual federal tax treatment depends on factors including the asset, holding period, income, and transaction details; the IRS capital gains and losses guidance explains the general rules.
Does holding an investment for one year automatically mean a 20% tax rate?
No, a one-year holding period does not automatically produce a 20% tax rate. Tax treatment depends on the holding period and the taxpayer’s circumstances, and the calculator’s tax figures are only illustrations rather than tax advice or a filing result.
Can an investment loss reduce taxes?
A realized capital loss can sometimes offset capital gains and may be subject to limits and carryover rules. An unrealized loss shown by comparing current market value with cost basis is not automatically a tax deduction; see the IRS guidance on capital gains and losses and keep transaction records.
