Use reduce() to get sum of interval of array of values Leave a reply One way of getting the sum of a given interval of an array of values. var INTERVAL = 5; var list = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11]; list.reduce(function(result, value, index) { var i = Math.floor(index/INTERVAL); result[i] ? result[i] += value : result[i] = value; return result; }, []); // Output: [15, 40, 11]