Vendor/phpspreadsheet/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Financial.php
public static function CUMIPMT($rate, $nper, $pv, $start, $end, $type = 0)
    {
        $rate = Functions::flattenSingleValue($rate);
        $nper = (int) Functions::flattenSingleValue($nper);
        $pv = Functions::flattenSingleValue($pv);
        $start = (int) Functions::flattenSingleValue($start);
        $end = (int) Functions::flattenSingleValue($end);
        $type = (int) Functions::flattenSingleValue($type);

        // Validate parameters
        if ($type != 0 && $type != 1) {
            return Functions::NAN();
        }
        if ($start < 1 || $start > $end) {
            return Functions::VALUE();
        }

        // Calculate
        $interest = 0;
        for ($per = $start; $per <= $end; ++$per) {
            $interest += self::IPMT($rate, $per, $nper, $pv, 0, $type);
        }

        return $interest;
    }
public static function CUMIPMT($rate, $nper, $pv, $start, $end, $type = 0)
    {
        $rate = Functions::flattenSingleValue($rate);
        $nper = (int) Functions::flattenSingleValue($nper);
        $pv = Functions::flattenSingleValue($pv);
        $start = (int) Functions::flattenSingleValue($start);
        $end = (int) Functions::flattenSingleValue($end);
        $type = (int) Functions::flattenSingleValue($type);

        // Validate parameters
        if ($type != 0 && $type != 1) {
            return Functions::NAN();
        }
        if ($start < 1 || $start > $end) {
            return Functions::VALUE();
        }

        // Calculate
        $interest = 0;
        for ($per = $start; $per <= $end; ++$per) {
            $interest += self::IPMT($rate, $per, $nper, $pv, 0, $type);
        }

        return $interest;
    }
public static function CUMIPMT ( $ rate , $ nper , $ pv , $ start , $ end , $ type = 0 ) { $ rate = Functions :: flattenSingleValue ( $ rate ) ; $ nper = ( int ) Functions :: flattenSingleValue ( $ nper ) ; $ pv = Functions :: flattenSingleValue ( $ pv ) ; $ start = ( int ) Functions :: flattenSingleValue ( $ start ) ; $ end = ( int ) Functions :: flattenSingleValue ( $ end ) ; $ type = ( int ) Functions :: flattenSingleValue ( $ type ) ; // Validate parameters if ( $ type != 0 && $ type != 1 ) { return Functions :: NAN ( ) ; } if ( $ start < 1 || $ start > $ end ) { return Functions :: VALUE ( ) ; } // Calculate $ interest = 0 ; for ( $ per = $ start ; $ per <= $ end ; ++ $ per ) { $ interest += self :: IPMT ( $ rate , $ per , $ nper , $ pv , 0 , $ type ) ; } return $ interest ; }
CUMIPMT.

Returns the cumulative interest paid on a loan between the start and end periods.

Excel Function:
CUMIPMT(rate,nper,pv,start,end[,type])

@category Financial Functions

@param float $rate The Interest rate
@param int $nper The total number of payment periods
@param float $pv Present Value
@param int $start The first period in the calculation.
Payment periods are numbered beginning with 1.
@param int $end the last period in the calculation
@param int $type A number 0 or 1 and indicates when payments are due:
0 or omitted    At the end of the period.
1                At the beginning of the period.

@return float
CUMIPMT .