# 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="https://2494440469-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fggsr9Xlsze5cwVr4WMof%2Fuploads%2FLWcUsSBUB5dm29e1q96f%2Fmath-1.png?alt=media&#x26;token=d8290068-41c3-480a-a40f-5e376fff9646" alt="" width="327"><figcaption></figcaption></figure>

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

<figure><img src="https://2494440469-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fggsr9Xlsze5cwVr4WMof%2Fuploads%2F087Ok3uQcPslirf2WuiL%2Fmath-2.png?alt=media&#x26;token=dc499bc1-4ba7-4bd3-a7b4-5c7fb8fb69ef" alt=""><figcaption></figcaption></figure>
