# Return on Investment (ROI)

**Formula:**`ROI = (Gain from Investment - Cost of Investment) / Cost of Investment`

## Introduction to Return on Investment (ROI) Calculator

Return on Investment (ROI) measures the gain or loss generated on an investment relative to the amount of money invested. ROI is usually expressed as a percentage and is typically used for personal financial decisions, to compare a company's profitability, or to compare the efficiency of different investments.

## Parameter usage:

`gainFromInvestment`

= Total gain from the investment`costOfInvestment`

= Total cost of the investment

## Output:

`ROI`

= Return on investment value

## Data validation

Both parameters `gainFromInvestment`

and `costOfInvestment`

should be numbers greater than zero.

## Summary

This formula helps to evaluate the profitability of an investment. A higher ROI indicates the investment gains compare favorably to its cost.

Tags: Finance, Investment, ROI, Performance