> For the complete documentation index, see [llms.txt](https://docs.augelab.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.augelab.com/function-blocks/blocks-reference/data-logic/mathmetical-operations/maximum.md).

# Maximum

This function block finds the largest value among a configurable set of numeric inputs and returns both that value and its position.

## 📥 Inputs <a href="#inputs" id="inputs"></a>

`Values`\
One or more numeric values (provided as individual inputs or a list). The number of available input sockets can be adjusted using the control below.

## 📤 Outputs <a href="#outputs" id="outputs"></a>

`Number`\
The highest numeric value found among the provided inputs.

`Index`\
The position (zero-based index) of the highest value within the provided inputs.

## 🕹️ Controls <a href="#controls" id="controls"></a>

`Input size`\
Choose how many numeric inputs are available (for example, from 2 up to the configured maximum). Changing this adjusts how many values you can feed into the block.

## 🎨 Features <a href="#features" id="features"></a>

* Dynamic input sizing — easily change how many numeric inputs the block accepts to match your data layout.
* Dual outputs — returns both the maximum value and its corresponding index so you can use either result in downstream logic.
* Works with lists or individual value sockets when available.

## 📊 Running mechanism <a href="#evaluation" id="evaluation"></a>

When the flow runs, the block examines the connected numeric inputs and determines the maximum value and its position. Only active/connected inputs are considered. If multiple inputs share the same maximum value, the index for the first occurrence is returned.

## 📝 Usage Instructions <a href="#usage" id="usage"></a>

1. Set the number of inputs with the `Input size` control to match how many values you will provide.
2. Connect numeric sources (or a list of numbers) to the `Values` inputs.
3. Read the `Number` output to get the maximum value and `Index` to get its position.
4. Feed those outputs to other blocks to drive logic, visualization or logging.

## 💡 Tips and Tricks <a href="#tips-and-tricks" id="tips-and-tricks"></a>

* Use `Get Element` to extract a specific value from a list before or after the `Maximum` block when working with batched data.
* Combine with `Batch Processing` and `Get Batch Size` when working on large lists or streaming data to lower memory usage and control how values are fed to the block.
* Send numeric outputs to `Scope` to visualize live value streams and easily spot trends or spikes.
* To compute a range, use `Minimum` alongside this block and then `Subtract` the results to get max−min.
* Store results with `Data Memory` if you need to freeze or hold a maximum value for later comparison.

## 🛠️ Troubleshooting <a href="#troubleshooting" id="troubleshooting"></a>

* No valid result: ensure at least one numeric input is connected.
* Unexpected index when values tie: the returned `Index` corresponds to the first occurrence of the maximum.
* Non-numeric inputs will prevent meaningful results — verify source blocks provide numbers.
