Excel Rate of Return Formula: Step-by-Step Guide
In this article
To calculate a simple rate of return in Excel, subtract the starting value from the ending value, divide by the starting value, and format the result as a percentage. For a more accurate annualized figure that accounts for the time your money was invested, use the RATE function. This guide walks through both methods, shows how to handle cash flows with XIRR, and covers the mistakes that make returns look wrong.
What You'll Need
- Excel (any recent version for Windows or Mac; the RATE and XIRR functions are also available in Excel for the web and mobile apps).
- Your starting value, ending value, and the number of periods (years, months, etc.) the investment was held. For irregular cash flows, you'll need the dates and amounts of each deposit or withdrawal.
- A basic understanding of cell references (e.g., A1, B2) so you can point formulas at the right cells.
Step-by-Step
- Lay out your data. In a blank sheet, enter labels in column A and values in column B. For example: A1 "Starting Value", B1 1000; A2 "Ending Value", B2 1200; A3 "Years Held", B3 2. Keep numbers as plain numbers (no currency symbols typed in) so Excel can calculate with them.
- Calculate the simple (total) return. In cell B4, type
=(B2-B1)/B1and press Enter. This gives the total return over the whole holding period as a decimal (0.2 for a 20% gain). To display it as a percentage, select B4, then use Home > Number Format > Percentage (or the % button on the ribbon). - Annualize the return with RATE. The RATE function finds the constant periodic rate that turns the starting value into the ending value over a number of periods. In B5, type
=RATE(B3,0,-B1,B2). The arguments are: number of periods (B3), payment per period (0, because there are no regular contributions), present value (-B1, entered as a negative because it's money going out), and future value (B2). Press Enter and format B5 as a percentage. This gives the compound annual growth rate (CAGR). - Check the result against a manual CAGR formula. As a cross-check, in B6 type
=(B2/B1)^(1/B3)-1. It should match the RATE result. If it doesn't, one of your inputs is wrong (often the sign of the present value or the number of periods). - Handle regular contributions or withdrawals. If you added or removed a fixed amount each period, put that amount in a cell (say B7) and use
=RATE(B3,B7,-B1,B2). Use a negative number for contributions (money you pay in) and a positive number for withdrawals. The result is the periodic rate; multiply by 12 for a monthly rate or leave as-is for annual. - Use XIRR for irregular cash flows. When deposits and withdrawals happen on uneven dates, XIRR is the right tool. List dates in column A and amounts in column B, with the initial investment as a negative number and later values as positive (or vice versa, as long as signs are consistent). Include the final ending value as a positive cash flow on its date. Then in an empty cell type
=XIRR(B2:B10,A2:A10)where B2:B10 are the amounts and A2:A10 are the dates. Format the result as a percentage. XIRR returns an annualized rate. - Format and label your output. Select the cells with your results, apply Percentage format, and optionally set decimal places to two. Add a label in the adjacent cell (e.g., "Annualized Return") so the sheet is readable later.
- Save and test with a known example. Before trusting the sheet, enter a simple case: start 100, end 121, 2 years. The annualized return should be 10%. If your formula returns 10%, the setup is correct.
Common Mistakes
- Forgetting the negative sign on the present value. RATE expects cash outflows as negative. If you enter B1 as positive, Excel may return a #NUM! error or a nonsensical rate.
- Mixing up total return and annualized return. A 20% total return over two years is not 20% per year; it's about 9.54% annualized. Label which one you're showing.
- Using the wrong number of periods. If your holding period is in months, RATE returns a monthly rate. Either convert the period count to years or multiply the result by 12 to annualize.
- Inconsistent cash flow signs in XIRR. All outflows should have one sign and all inflows the opposite. Mixed signs within the same direction produce errors or misleading results.
- Typing percentages as text. If a cell contains "10%" as text (left-aligned), formulas will ignore or error on it. Enter 0.1 and format as percentage instead.
- Including the ending value twice. In XIRR, the final positive cash flow should represent the ending value. Don't also add a separate "ending value" row unless it's a distinct cash flow.
Tips
- Name your input cells (Formulas > Define Name) so formulas read like
=RATE(Years,0,-StartValue,EndValue)and are easier to audit. - Use a separate "Inputs" area at the top of the sheet and keep formulas below it; this makes it simple to change assumptions without hunting through cells.
- For a quick sanity check, the Rule of 72 estimates doubling time: 72 divided by the annual return percentage. If your calculated return implies a doubling time that seems implausible, recheck the inputs.
- XIRR requires at least one negative and one positive cash flow; if all values are positive, it returns #NUM!.
- Dates in XIRR must be real Excel dates, not text. If they're left-aligned, convert them with Date > Text to Columns or re-enter them.
Troubleshooting
If RATE returns #NUM!, first check that the present value is negative and the future value is positive. If the result is #VALUE!, one of the arguments is text rather than a number; clear any stray spaces or currency symbols. If XIRR returns #NUM!, confirm you have both positive and negative amounts and that every date is a valid Excel date. If the rate looks far too high or low, verify the number of periods matches the units of your rate (years vs. months) and that you haven't included the starting value as a cash flow in XIRR. For a zero return (start equals end), RATE returns 0%, which is correct. If your formula works in one cell but not another, copy the working formula and adjust references rather than retyping it.
Frequently Asked Questions
What's the difference between RATE and XIRR?
RATE assumes equal periods and, optionally, equal payments. XIRR handles irregular dates and amounts, making it better for real-world portfolios with deposits and withdrawals at random times.
Can I calculate monthly returns in Excel?
Yes. Use the number of months as the period count in RATE, or use XIRR with monthly dates. The result will be a monthly rate; multiply by 12 for a rough annual figure.
Why does my RATE formula return a negative number?
A negative result usually means the ending value is less than the starting value (a loss), or the signs of present and future value are reversed. Check both.
Does XIRR work in Excel for the web?
Yes, XIRR and RATE are standard functions available in Excel for the web and mobile apps, though menu labels for formatting may differ slightly by version.
How do I show the result as a percentage with two decimals?
Select the cell, then use Home > Number Format > Percentage and increase decimal places with the .00 button, or right-click > Format Cells > Percentage and set two decimal places.
Can I use these formulas for a savings account?
Yes. For a savings account with regular deposits, RATE with a payment argument works well; for irregular deposits, use XIRR with the actual dates.