Math Tools

Perform calculations and mathematical operations.

Overview

The Math Tools connector is a built-in utility for arithmetic, statistics, rounding, and currency formatting inside a workflow. It exposes both expression-style evaluation (calculate) and individual operations (sum, average, median, std-dev, etc.) so you can keep math out of Transform nodes when a single deterministic step is cleaner.

It's most useful in financial and reporting workflows: computing order totals, applying tax and discount adjustments, building daily summaries from a list of executions, or formatting numeric output for emails and Slack messages.

What You Can Do

The Math connector exposes these tools:

  • calculate - Evaluate an arithmetic expression (e.g. (subtotal * 1.1) - shipping).
  • sum - Total a list of numbers.
  • average - Mean of a list of numbers.
  • median - Middle value of a list of numbers.
  • min - Smallest value in a list.
  • max - Largest value in a list.
  • std-dev - Standard deviation of a list.
  • abs - Absolute value.
  • round - Round to N decimal places.
  • ceil - Round up to the next integer.
  • floor - Round down to the previous integer.
  • power - Raise a number to an exponent.
  • sqrt - Square root.
  • modulo - Remainder of a division.
  • percentage - Compute one number as a percentage of another.
  • random - Random number in a range.
  • format - Format a number with thousands separators and decimal precision.
  • currency - Format a number as a currency string (e.g. $1,234.50).

Authentication and Setup

No connection or authentication is required. These tools are built into the platform and available in every workflow by default - just drop a Connector node onto the canvas and pick the tool you need.

Using in a Workflow

Add a Connector node, select Math Tools, and pick a mode:

  • Direct Mode - Recommended for financial math. Call calculate with an explicit expression so the formula is auditable on the canvas.
  • Agent Mode - Useful when the operation depends on prose ("what's the average order value across these records?").

For repeated arithmetic across many records, put the math node inside a Loop node and operate on one item at a time, or use sum/average on the full list.

Tips

  • Use currency for display only. Always do the underlying math on raw numbers and format at the end.
  • Round once, at the boundary. Carry full-precision values through the workflow and round just before writing to the database or sending to the user.
  • Prefer calculate over chaining several arithmetic nodes - a single expression is easier to read and review.
  • Use std-dev for anomaly detection - flag a record when its value is more than two standard deviations from the mean of the batch.

Common Pitfalls

  • Floating-point precision - Decimal math (e.g. 0.1 + 0.2) can produce trailing-digit noise. Round explicitly when comparing money values.
  • Currency locale - currency uses the locale you pass; the default may not match your store. Specify it explicitly for non-USD output.
  • Division by zero - percentage and modulo error when the divisor is zero. Guard with a Condition node when input data may be empty.
  • String inputs - Upstream connectors sometimes return numbers as strings. Use a Transform node or calculate (which coerces) rather than passing them through raw arithmetic tools.

Common Use Cases

Related Articles

For technical API details and field specifications, see the Math Tools documentation.

Did this answer your question? Thanks for the feedback There was a problem submitting your feedback. Please try again later.