# MIN

The MIN function returns the smallest number in a set of values. Node references are also accepted as arguments.

### Syntax

MIN(value1, ...valueN?) - > number

### Arguments

<table><thead><tr><th width="185">Arguments</th><th width="221">Datatype</th><th>Description</th></tr></thead><tbody><tr><td>value1</td><td>Number, Node reference</td><td>The nodes or numbers for which you want to get the smallest value.</td></tr><tr><td>valueN?</td><td>Number, Node reference</td><td>Additional nodes or numbers for which you want to get smallest value. This is an optional argument.</td></tr></tbody></table>

### Example&#x20;

Consider a node which has the demand for a particular product for 12 months.

<figure><img src="/files/1JcX2bbixwjFy82cCWgz" alt=""><figcaption></figcaption></figure>

To calculate the minimum demand, the formula should be written in the \[Minimum Demand] node

<mark style="color:blue;">**`MIN`**</mark>**`(`**<mark style="color:purple;">**`[Demand]`**</mark>**`.`**<mark style="color:blue;">**`ALL_PERIODS`**</mark>**`)`**

We are including [**.ALL\_PERIODS**](https://docs.valq.com/model/formula-functions/math-functions/pages/bd9R41FrVkmuCJPGQLmc#node-.all_periods) so that it will consider all the period values rather than one single period.

### **Result**

| **Minimum Demand** | 136 |
| ------------------ | --- |


---

# 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.valq.com/model/formula-functions/math-functions/min.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.
