inyourbrowser.com

ROI calculator

ROI calculator is a finance tool that measures return on investment for any cost-versus-gain scenario. It supports simple ROI, annualized ROI for multi-year holdings, and marketing ROI for ad spend, and outputs the percentage, net gain, and multiplier on the original outlay. The tool runs in your browser.

ROI: 20.00%.

Calculation mode

Currency

Formula: ROI % = ((gain - cost) / cost) x 100

ROI

20.00%
Net gain
$2,000.00
Multiplier
1.20x
Initial cost
$10,000.00
Final value (total returned)
$12,000.00

Calculations are estimates for informational purposes only. Consult a financial professional for advice.

How to calculate ROI

  1. Select the mode: simple ROI, annualized ROI, or marketing ROI.
  2. Enter the cost or ad spend.
  3. Enter the final value or attributed revenue.
  4. For annualized ROI, also enter the holding period in years.

Common uses

  • Comparing investments held for different lengths of time: annualized mode turns a 50% gain over 10 years into about 4.14% a year and a 20% gain over 2 years into about 9.54% a year, so the two can be compared directly.
  • Reporting a campaign: marketing mode shows ROI as a percentage next to the revenue-to-spend multiplier (ROAS).
  • Setting a benchmark: project the same money at a fixed interest rate to see what steady compounding would have returned, or work out the percentage change between two values.

The finance tools guide compares the five finance calculators and the formulas behind them.

Technical specification

  • Algorithm or formula: Simple ROI ((gain - cost) / cost) * 100. Annualized ROI uses the CAGR formula ((gain / cost)^(1 / years) - 1) * 100. Marketing ROI ((revenue - spend) / spend) * 100; ROAS is revenue / spend. Annualizing solves cost · (1 + i)^years = gain for the yearly rate i, the standard compound rate-of-return calculation (Kellison, The Theory of Interest, 3rd ed., 2009).
  • Browser API or library: Pure JavaScript arithmetic with Math.pow for the CAGR exponent; no external library.
  • Input limits: Cost above 0 and final value of 0 or more. Holding period 0.01–100 years for annualized mode.
  • Output: ROI percentage, net gain or loss, and multiplier (gain divided by cost). In annualized mode the percentage is the per-year rate, while the net gain and multiplier show the total return.
  • Known limitations: ROI is undefined for a cost of zero, so the tool asks for a cost above 0. Ignores taxes, fees, inflation, and risk-adjusted measures (e.g., Sharpe ratio).

Frequently asked questions

What is the simple ROI formula?
ROI % = ((gain - cost) / cost) x 100. An investment of 10,000 that returns 12,000 has a net gain of 2,000 and an ROI of 20%, which is a 1.2x multiplier on the original money. Calculations are estimates for informational purposes only. Consult a financial professional for advice.
When should I use annualized ROI?
Use annualized ROI to compare investments held for different lengths of time. The formula is ((gain / cost)^(1 / years) - 1) x 100, which expresses the total return as an equivalent constant per-year rate.
What is the difference between ROI and ROAS?
Return on ad spend (ROAS) is revenue divided by spend, expressed as a multiplier. Marketing ROI subtracts the spend first, then expresses the net as a percentage. A 4x ROAS is the same as a 300% marketing ROI.
Is my financial data sent to a server?
All calculations run locally in your browser as JavaScript. Our servers are not involved at any point.

Calculations are estimates for informational purposes only. Consult a financial professional for advice.

Related tools

Compound interest calculator
Calculate compound interest with daily, monthly, quarterly, or annual compounding. Includes a year-by-year breakdown table.
Mortgage calculator
Calculate monthly mortgage payments, total interest, and amortization schedule. Standard formula, runs in your browser.
Loan calculator
Calculate monthly payments and total interest for auto, personal, or student loans. Runs in your browser.
Percentage calculator
Calculate percentages three ways: X% of Y, X is what % of Y, and percentage change.

Reviewed and tested September 30, 2026.