## CUMIPMT Function

The CUMIPMT function in Google Sheets calculates the cumulative interest paid on a loan between two periods.

### Syntax

```
CUMIPMT(rate, number_of_periods, present_value, first_period, last_period, end_or_beginning)
```

`rate`

: The interest rate for each period.`number_of_periods`

: The total number of payment periods.`present_value`

: The present value, or the total value of all loan payments.`first_period`

: The first period in the calculation.`last_period`

: The last period in the calculation.`end_or_beginning`

: Specifies when payments are due. Use 0 for payments due at the end of the period, and 1 for payments due at the beginning.

### Examples

**Basic Cumulative Interest Calculation**

Calculate the interest paid between periods 1 and 12 for a loan with a 5% annual interest rate, over 5 years, with a $10,000 present value:

```
=CUMIPMT(0.05/12, 60, 10000, 1, 12, 0)
```

This will output the cumulative interest paid in the first year.

**Interest Calculation with Payments at Beginning of Period**

Calculate with payments at the beginning of the period:

```
=CUMIPMT(0.05/12, 60, 10000, 1, 12, 1)
```

This will output the cumulative interest considering payments at the beginning.

### Notes

- The function helps to track the interest portion of payments over time.
- Ensure that the first_period and last_period are within the range of total periods.