---
url: /cube-functions/xirr.md
description: 'Only Executes Under: Cubes'
---

# XIRR

**Only Executes Under:** `Cubes`

Calculates the extended internal rate of return for a series of cash flows at irregular intervals.

```js
XIRR(value_location, dimension, hierarchy, start_position, count, guess)
```

#### Parameters

* `value_location` - Location in cube to pull values from.
* `dimension` - The name of the time dimension.
* `hierarchy` - The name of the hierarchy.
* `start_position` - Position in hierarchy to start from.
* `count` - How many elements in hierarchy to include.
* `guess` - An initial guess at the XIRR. `(optional)`

#### Examples

```js
XIRR(["Amount"], "Time", "Month List", 3, 4)
```
