Return on investment, or ROI, is the percentage gain or loss on the money you put into something, and an ROI calculator is a free browser tool that computes that percentage plus your net profit from just two numbers: what you paid and what the investment is now worth. The standard formula is ROI% = (final value − initial cost) ÷ initial cost × 100, so a $500 gain on a $1,000 stake works out to 50%, while the same $500 gain on a $10,000 stake is only 5%. An ROI calculator also reports net profit in dollars and, if you add a holding period in years, it shows the annualized ROI — also called the compound annual growth rate (CAGR) — which is the steady yearly rate that would have turned your cost into the final value. That distinction matters because plain ROI ignores time: turning $1,000 into $1,500 looks like the same 50% whether it took one year or ten, even though the one-year result is dramatically better on an annualized basis. The rest of this article walks through each input the calculator takes, the exact math it runs, a worked example, and the limits you should keep in mind before treating any single number as a decision.

roi calculator explained
ROI Calculator Explained: Inputs, Math, and Output

What an ROI Calculator Measures (and What It Doesn't)

ROI is the most widely used yardstick for comparing investments because it normalizes gains against the amount of capital you put in, according to the standard definition used in Wikipedia's entry on return on investment. By dividing profit by cost, ROI lines up a stock trade, a rental property, a marketing campaign, or a side project on the same percentage scale, which is why the metric is so popular for side-by-side comparisons across very different asset classes.

What an ROI calculator reports is straightforward: a percentage that says how much the investment made or lost relative to what you paid, and a dollar figure for net profit. A positive ROI means you gained money, zero means you broke even, and a negative ROI means you lost money — for example, a $2,000 cost that ends at $1,600 is a −20% ROI and a $400 loss.

What the calculator does not do is subtract trading fees, taxes, inflation, or the opportunity cost of capital, and it treats the whole gain as fully realized at the moment you enter the final value. Those adjustments matter a lot in real portfolios, so the output is best read as a clean gross return rather than a take-home number. The ROI Calculator runs every calculation locally in your browser, so nothing you type is uploaded, which keeps sensitive inputs like a cost basis private.

The Two Inputs: Cost and Final Value

An ROI calculator takes exactly two required fields, and the rest is optional math that depends on whether you want a time-aware figure.

  • Initial cost — the total amount of money you invested, in dollars. Use the full amount you actually put in, not a partial position or a notional exposure. If you bought 10 shares at $50 plus a $5 commission, the cost is $505, not $500, because fees reduce the capital working for you.
  • Final value — what the investment is worth now, or what you sold it for. For an unrealized position, use the current market price multiplied by your share count. For a realized position, use the gross sale proceeds before taxes.

These two numbers are enough for plain ROI. Adding a third field, the holding period in years, unlocks the annualized figure described in the next section.

How to Use the ROI Calculator

  1. Enter the initial cost — the total amount of money you invested, in dollars.
  2. Enter the final value — what the investment is worth now or what you sold it for.
  3. Read the ROI percentage and net profit instantly; optionally add a holding period in years to also see the annualized ROI (CAGR).

There is nothing to save, nothing to sign up for, and no spreadsheet setup. The result updates the moment either number changes, so you can experiment with different final values to see what return you would need for a target outcome — for instance, what final value produces a 25% ROI on your $8,000 cost, or how a 10% drop in the final value changes the percentage.

Plain ROI vs. Annualized ROI (CAGR)

Plain ROI answers the question "how much did I make, as a percentage of what I put in?" It does not answer the equally important question "how fast did I make it?" Annualized ROI, also called the compound annual growth rate or CAGR, answers that second question by smoothing the total gain across the years you held the investment.

DimensionPlain ROIAnnualized ROI (CAGR)
Inputs requiredCost and final valueCost, final value, and holding period in years
Formula(final value − cost) ÷ cost × 100((final value ÷ cost)^(1 ÷ years) − 1) × 100
Accounts for timeNo — same 50% whether held one year or tenYes — expresses the gain as a steady yearly rate
Allows a lossYes — final value below cost produces a negative ROIOnly when final value is positive — a negative base cannot take a fractional root
Best used forQuick side-by-side comparison of one-shot returnsComparing investments held over different time spans, or against a benchmark index

The CAGR formula, ((final value ÷ cost)^(1 ÷ years) − 1) × 100, asks "what constant yearly rate, compounded once per year, would have grown the cost into the final value?" That makes it the right number to compare against a savings rate, a bond yield, or an index return. For a deeper walkthrough of the CAGR formula and how it behaves across realistic holding periods, see how to calculate ROI in years with the CAGR formula and example.

A Worked Example: $10,000 to $20,000 Over 10 Years

To see the difference between the two numbers in one calculation, consider an asset bought for $10,000 and sold a decade later for $20,000.

Plain ROI: (20,000 − 10,000) ÷ 10,000 × 100 = 100%, and net profit = 20,000 − 10,000 = $10,000. By the headline percentage, this looks like a doubling — and it is, in raw dollar terms.

Annualized ROI: ((20,000 ÷ 10,000)^(1 ÷ 10) − 1) × 100 = (2^0.1 − 1) × 100. Two to the power of one-tenth is roughly 1.07177, so the CAGR works out to about 7.18% per year. A 100% gain spread across ten years is far more comparable to a long-term stock-market return than the doubled-your-money headline suggests, and that comparison is exactly why annualized ROI exists as a separate output.

Limits, Caveats, and When ROI Can Mislead

Three input rules apply. The initial cost must be greater than zero because it is the denominator of the formula. Annualized ROI additionally requires the final value to be greater than zero, because a negative base cannot take a fractional root. The holding period, if supplied, must be greater than zero years. Violations are rejected rather than returned as NaN or some other nonsense result.

ROI as defined here also has four blind spots worth naming. It does not subtract trading commissions, taxes, inflation, or the opportunity cost of capital — the return you could have earned elsewhere on the same dollars. It treats the whole gain as fully realized, even if part of it is paper profit on an unsold position. It says nothing about risk, volatility, or the path the return took to get there. And on its own it ignores time, which is the entire reason the annualized view is offered as an option.

When a Different Tool Fits Better

For investments that compound over regular deposits — monthly contributions into an index fund, recurring savings, or a retirement account — a plain ROI view misses most of the action. In those cases, the inputs are not a single cost and a single final value but a starting balance plus a stream of deposits, and the right tool is a compound interest calculator or a dedicated savings calculator that can show the contribution-versus-interest split. For borrowing to fund an investment, the cost of the loan changes what counts as profit, so a car loan or mortgage calculator helps size the borrowing side first. The ROI calculator is the right tool for one-shot capital outlays with a known ending value: a trade, a flip, a single project, or a marketing campaign that you can tag with a final dollar outcome.

Treat the numbers this tool produces as quick estimates for general information only, and verify any decision-size figure with a licensed professional.

If you're weighing options, Mortgage Calculator Formula: The Math Behind Your Payment covers this in detail.