# Rule action: Calculate sum

**Used for:** calculating the sum of a field that contains a list of numbers.

**Used in:** "THEN"-statements and "ELSE"-statements.

The "calculate sum" rule is used to calculate the sum of a list of numbers. An example use case is when you have a list of stock numbers for every size of a product. Using the "calculate sum" rule you could easily calculate the total stock amount for that product, which would look like shown below.

<figure><img src="https://helpcenter.channable.com/hc/article_attachments/360007546279/channable_rules_what-does-each-rule-do-rule-calculate-sum-0.png" alt=""><figcaption></figcaption></figure>

The output of this rule would look like this:

&#x20;

<figure><img src="https://helpcenter.channable.com/hc/article_attachments/360007546299/channable_rules_what-does-each-rule-do-rule-calculate-sum-1.png" alt=""><figcaption></figcaption></figure>
