# SUBTRACT

The *SUBTRACT* function subtracts a series of values and returns the resulting number. It deducts subsequent values from the first value provided and is commonly used in calculations where differences between numbers need to be determined.

#### Syntax

```javascript
SUBTRACT(value1, value2, ... valueN)
```

#### Arguments

* `value1`: The value from which the other values are subtracted.
* `value2, ... valueN` (Optional): Additional values or node references to subtract from the first value.

#### Return value

Returns the result after subtracting the specified values.

#### Example

```javascript
SUBTRACT(Sales, Sales Plan)
```

In this example, the *Sales Variance* measure is created using the SUBTRACT function, which returns the result of subtracting the values in *Sales Plan* from *Sales*.

<figure><img src="/files/VmD7GpC3ZJMMcnWyd8xO" alt=""><figcaption></figcaption></figure>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.fabricplan.com/planning-sheets/formula-syntax/math-functions/subtract.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
