# suml(List) or suml(List of list , x\[index])

This function is designed to return the sum of a list of values or the sum of values located at specific indices within each sublist in the list.

**suml(List) → number**

This function designed to calculate the sum of a list of numeric values or elements. **suml(List of list , x\[index]) → number**

This function designed to calculate the sum of values located at specific indices within each sublist in the list.

**Example:**

```xml
<O N="sumlObject1" T="Project" Category="Functions" TransAlignRule="1">
    <!-- created by ParamML Examples on 8/21/2023 -->
    <P N="List1" V="[0,1,2,3,4,5,6,7,8,9]" />
    <P N="List2" V="[List1,List1]" />
    <P N="sumList" V="suml(List1)" />
    <P N="sumRangeList" V="suml(List2,x[3])" />
</O>
```

![](https://openbrim.atlassian.net/wiki/download/attachments/2167636177/image-20230821-151622.png?api=v2) As demonstrated, sumList returns the total of List1 while sumRangeList returns the sum of values at index 3 within each sublist of List2. To view this example in the library, see (<https://openbrim.org/app/?incubator=1&author=ParamML_Examples_OpenBrIM+Platform&obj=objid8daihf7iq3pj36d2t4mjd> )
