Skip to content

Cookie preferences

We use cookies for our own analytics, to see how our campaigns perform and, if you allow it, to load content from other services such as the Google site search. We never sell your data. Necessary cookies keep the site working and cannot be switched off. See our Cookie Policy for details and our Privacy Policy for how we handle personal data.

Security, load balancing and remembering your cookie choice.

Show us which pages people read, how they find the site and where they get stuck, so we can improve it (Google Analytics, Microsoft Clarity).

Show us which of our ad campaigns bring visitors to the site and remember the campaign or partner link you arrived from (Google Ads, LinkedIn, Meta, partner program). We do not use these cookies to build advertising profiles.

Load the site search from Google when you use it. Google sets its own cookies and shows ads in the search results.

© 2026 The ThingsBoard Authors
22.5k Try for free

ThingsBoard Cloud

Choose your data region

Your data stays in the region you choose, for residency and compliance. No credit card required.

Rather run it yourself? Install on your own servers

Simple Calculated Field

Simple calculated fields compute a real-time value using a single mathematical expression — no scripting required. For example, given temperature and humidity telemetry, the expression 243.04 * (ln(humidity/100) + 17.625 * temperature / (243.04 + temperature)) / (17.625 - (ln(humidity/100) + 17.625 * temperature / (243.04 + temperature))) computes the dew point and stores it as dewPoint the moment new data arrives.

Use Simple when you need:

  • Derived sensor metrics (dew point, heat index, power = voltage × current)
  • Normalization and scaling (calibration factors, unit conversions)
  • Threshold-based values (clamping, simple scoring, deltas)
  • Cross-entity calculations (combine device telemetry with asset attributes)
  1. Open the Calculated fields page.
  2. Click the + Add calculated field ⇾ Create new calculated field in the top-right corner.
  3. In General, enter a title, specify the entity the field applies to, and select the Simple type.
  4. Add Arguments, write the Expression, and configure Output.
  5. Click Add to save.

Simple fields support Latest telemetry and Attribute argument types. The data source can be the current entity, another Device or Asset, the Customer, the current tenant, or the current owner.

For full argument configuration details, see Calculated Fields — Arguments.

In the Expression field, write a single mathematical formula that references your arguments by name (e.g., temperature, humidity).

Supported operations and functions:

Category Supported
Arithmetic +, -, *, /
Functions abs, sqrt, pow, min, max, ln, log, ceil, floor, round

The expression produces one result value, stored under the configured output key.

Field Description
Output type Time series or Attribute
Key The name under which the computed value is saved
Decimals Optional decimal rounding
Use latest timestamp Time series only — stores the result using the most recent argument timestamp

For output strategy options, see Calculated Fields — Output Strategy.

A Smart Device sends temperature (°C) and humidity (%) as telemetry in real time. Goal: compute dewPoint and store it as a time series key on the same device.

  1. Open the Calculated fields page.
  2. Click the + Add calculated field ⇾ Create new calculated field in the top-right corner.
  3. In General:
    • Title: Dew Point
    • Entity: Smart Device (or its device profile)
    • Type: Simple
  4. Click Add argument:
    • Entity type: Current entity
    • Argument type: Latest telemetry
    • Time series key: humidity
    • Argument name: humidity
  5. Add a second argument for temperature with the same settings.
  6. In Expression, enter:
    243.04 * (ln(humidity / 100) + 17.625 * temperature / (243.04 + temperature)) /
    (17.625 - (ln(humidity / 100) + 17.625 * temperature / (243.04 + temperature)))
  7. In Output:
    • Output type: Time series
    • Key: dewPoint
  8. Click Add.

Result: Each time temperature or humidity is updated, dewPoint is recalculated and stored as a new telemetry entry on the Smart Device.