# Google Sheets XIRR Function: Syntax, Examples & Tips

- URL: https://betteranalyst.com/google-sheets/xirr-function
- Author: Better Analyst

Formula Bot is now Better Analyst—same account, more powerful analysis.Formula Bot is now Better Analyst—same account and workflows, with more powerful analysis, dashboards, and automation.

[Learn what changed](https://betteranalyst.com/formula-bot-is-now-better-analyst)

The XIRR function calculates the internal rate of return for a series of cash flows occurring at irregular intervals.

```
XIRR(cashflow_amounts, cashflow_dates, [rate_guess])
```

Generate FormulaExplain Formula

One free generation or explanation per browser, shared across Excel and Google Sheets. Account usage limits apply afterward.

Describe the XIRR you need in plain EnglishGenerate Formula

## Parameters

**`cashflow_amounts`**:\
The range of cash flow amounts, which can include both positive (inflows) and negative (outflows) values, corresponding to the cash flows at specific dates.

**`cashflow_dates`**:\
The range of dates that correspond to each cash flow amount in `cashflow_amounts`. Each date must be in a valid date format.

**`rate_guess`**:\
An optional parameter that represents your guess for the expected internal rate of return. If omitted, Google Sheets uses a default value of 0.1 (or 10%).

## What is an XIRR?

The *XIRR* function in Google Sheets is a financial function used to calculate the internal rate of return for a series of cash flows that occur at irregular intervals. It is particularly useful for evaluating investments or projects where cash inflows and outflows do not happen at regular time intervals. Unlike the regular IRR function, which assumes equal time periods between cash flows, XIRR takes into account the actual dates of each cash flow.

In simpler terms, XIRR allows you to determine the annualized return on an investment based on the timing and amount of cash flows.

## A Practical Example

Imagine you are tracking an investment where you have made several cash inflows and outflows over time:

### Cash Flow Table:

| Date | Cash Flow |
| - | - |
| 2023-01-01 | -10000 |
| 2023-06-01 | 3000 |
| 2023-12-01 | 4000 |
| 2024-06-01 | 5000 |

In this table, the negative cash flow represents the initial investment, while the positive cash flows represent returns from the investment.

## XIRR Formula

To calculate the internal rate of return for this investment, you would use the XIRR function as follows:

```
=XIRR(B2:B5, A2:A5)
```

In this formula:

- `B2:B5` is the range containing the cash flow amounts.
- `A2:A5` is the range containing the corresponding dates of each cash flow.

## Result of the Formula

When you apply the XIRR formula to the Cash Flow Table, it will return the internal rate of return for the investment. For example, if the result is `0.15`, this indicates an annualized return of 15%.

## Why Use XIRR?

XIRR is beneficial because it provides a more accurate representation of the return on investment when cash flows occur at irregular intervals. It allows investors and financial analysts to assess the performance of investments more effectively, considering the timing of cash flows. This makes it an essential tool for financial modeling and investment analysis.

## Key Takeaways:

- **XIRR**: A financial function that calculates the internal rate of return for cash flows occurring at irregular intervals.
- **Accurate Returns**: Provides a more precise measure of investment performance compared to regular IRR.
- **Real-World Applications**: Ideal for evaluating investments, projects, and any financial scenarios involving irregular cash flows.
- **Investment Analysis**: Helps investors make informed decisions based on the timing and magnitude of cash flows.

XIRR is an essential function for anyone involved in finance or investment analysis, providing a powerful way to evaluate the profitability of investments over time.

Happy investing!

## Example use case

You have a table with investment cash flows in Column A and corresponding dates in Column B. Use the XIRR formula to calculate the annualized return on investment, allowing for a clear understanding of profitability over time, even with irregular cash flows.

## Need more help with Google Sheets formulas?

Sign up for Better Analyst and get unlimited AI-powered formula generation, explanations, and advanced data analysis.

[Create Free Account](https://betteranalyst.com/signup)[Try Formula Generator](https://betteranalyst.com/excel-ai)

## Google Sheets how-to guides

- [How To Separate Names In Google Sheets](https://betteranalyst.com/google-sheets/how-to-separate-names-in-google-sheets)
- [How To Sort In Google Sheets](https://betteranalyst.com/google-sheets/how-to-sort-in-google-sheets)
- [How To Split Cells In Google Sheets](https://betteranalyst.com/google-sheets/how-to-split-cells-in-google-sheets)
- [How To Strikethrough In Google Sheets](https://betteranalyst.com/google-sheets/how-to-strikethrough-in-google-sheets)
- [How To Subtract In Google Sheets](https://betteranalyst.com/google-sheets/how-to-subtract-in-google-sheets)
- [How To Transpose Data In Google Sheets](https://betteranalyst.com/google-sheets/how-to-transpose-data-in-google-sheets)
- [How To Unhide Columns In Google Sheets](https://betteranalyst.com/google-sheets/how-to-unhide-all-columns-in-google-sheets)
- [How To Unhide Rows In Google Sheets](https://betteranalyst.com/google-sheets/how-to-unhide-all-rows-in-google-sheets)

## Explore all Google Sheets formulas

Browse our complete library of Google Sheets formula guides

Compare your options

## Decide with evidence, not a sales pitch.

Open a neutral research prompt in the AI tool you already use. Compare capabilities, limitations, and fit before you choose.

1. [01ChatGPTOpen a balanced comparison prompt in ChatGPT.](https://chatgpt.com/?prompt=Compare%20Better%20Analyst%20with%20using%20a%20general-purpose%20AI%20assistant%20for%20data%20analysis.%20Evaluate%20spreadsheet%20and%20document%20analysis%2C%20dashboards%2C%20repeatable%20reports%2C%20code%20transparency%2C%20data%20connections%2C%20pricing%2C%20and%20limitations.%20Use%20current%20public%20sources%2C%20distinguish%20verified%20facts%20from%20assumptions%2C%20and%20explain%20which%20types%20of%20users%20each%20option%20fits%20best.)
2. [02ClaudeOpen the same research prompt in Claude.](https://claude.ai/new?q=Compare%20Better%20Analyst%20with%20using%20a%20general-purpose%20AI%20assistant%20for%20data%20analysis.%20Evaluate%20spreadsheet%20and%20document%20analysis%2C%20dashboards%2C%20repeatable%20reports%2C%20code%20transparency%2C%20data%20connections%2C%20pricing%2C%20and%20limitations.%20Use%20current%20public%20sources%2C%20distinguish%20verified%20facts%20from%20assumptions%2C%20and%20explain%20which%20types%20of%20users%20each%20option%20fits%20best.)
3. [03PerplexityResearch the comparison with linked web sources.](https://www.perplexity.ai/search?q=Compare%20Better%20Analyst%20with%20using%20a%20general-purpose%20AI%20assistant%20for%20data%20analysis.%20Evaluate%20spreadsheet%20and%20document%20analysis%2C%20dashboards%2C%20repeatable%20reports%2C%20code%20transparency%2C%20data%20connections%2C%20pricing%2C%20and%20limitations.%20Use%20current%20public%20sources%2C%20distinguish%20verified%20facts%20from%20assumptions%2C%20and%20explain%20which%20types%20of%20users%20each%20option%20fits%20best.)

AI answers can be incomplete. Check source links, current pricing, and product documentation before deciding.
