product product is a Twig filter to calculate the product of values in an array. {% set array = [2, 4, 6, 8] %} {{ array|product }} The result will be: 384 Source: Jasny