--- title: "dif (Difference)" slug: "calc-function-dif" updated: 2026-05-12T12:56:00Z published: 2026-05-12T12:56:00Z canonical: "docs.lobstersoftware.com/calc-function-dif" --- > ## Documentation Index > Fetch the complete documentation index at: https://docs.lobstersoftware.com/llms.txt > Use this file to discover all available pages before exploring further. # dif (Difference) *See also*: [calc (Calculate expression)](/v1/docs/en/calc-function-calc) > [!NOTE] > $dif calculates the difference between two values. The first parameter is the minuend, all other parameters are the subtrahends. > > > [!TIP] > > Tooltip > > > > Syntax: *$dif(a,b[,c[...]])* > > > > | Parameter | Description | > > | --- | --- | > > | `a` | The minuend of the subtraction, a can be a value (e.g. "5"), a list (e.g. $el(3,true)) or a reference to a value (e.g. $el(3)). | > > | `other parameters` | Other parameters of type a, the subtrahenders. | > > > > Example: $dif(3,5) – returns 3-5=-2$dif(3,5,7) – returns 3-5-7=-9 ## Syntax *$dif( a , b[, c[...]] )* ## Parameter | Name | Description | | --- | --- | | a | The minuend of the subtraction, a can be a value (e.g. " 5 "), a list (e.g. $el(3,true) ) or a reference to a value (e.g. $el(3) ). | | Other parameters | Other parameters of type a, the subtrahend. | ## Return value The result of the subtraction as a numerical value. ## Example ```plaintext $dif( $el(3), $el(4) ) ```