# Math

The **Math** widget allows you to apply a math function to the measured data of a data field within a specified time frame.&#x20;

{% hint style="info" %}
The Math widget is available on device types, devices, and global dashboards.
{% endhint %}

The following math functions are currently available:

* **Min** - finds the minimum value of a data set.
* **Max** - finds the maximum value of a data set.
* **Sum** - finds the sum of a data set.
* **Average** - finds the average value of a data set.

In the **Widget options** modal configure the following settings:

In the **Name** text box, enter a **name** as the label to identify your widget.

In the **Data field** drop-down, select the **data field** that you want to input for the math function.

In the **Math type** drop-down, select the **math function** that you want to apply.

Choose the desired timeframe using either the **LastFrom** text box or the **Date range** date/time pickers. Read the [**Map** ](#map)widget section to learn more about how to select a timeframe.

To add a **color** to the **background** of the widget, click on the **Background color** box and choose a **color** from the **color picker**.

Click on the **Save** button.

<figure><img src="/files/hfFgjGplM6GIqgHmM7ak" alt="" width="327"><figcaption></figcaption></figure>

The resulting **Math** widget looks like this:

<figure><img src="/files/u4UdLTAkILJoLmyDZu3J" 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.widgelix.com/get-started/widgets/math.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.
