Blocks

Math

Perform mathematical operations

Perform various mathematical operations including basic arithmetic, trigonometry, statistics, and custom expressions. Supports multiple number formats and precision control.

Back to Catalog
Core Blocksmath

Block Preview

Math

Perform mathematical operations

Usage

  1. Add the block to your workflow and connect it to the upstream step.
  2. Configure any required credentials or tokens in the inputs.
  3. Fill in required inputs and optional parameters for the run.
  4. Run a test execution, inspect outputs, and iterate before deploying.
  5. Deploy the math block with monitoring enabled in production.

Inputs (UI)

Operation

dropdown

Layout: half

Options: Add, Subtract, Multiply, Divide

Decimal Precision

short-input

Placeholder: Number of decimal places (default: 2)

Layout: half

Input A

short-input

Placeholder: First number

Layout: half

Condition: operation = ["add","subtract","multiply","divide","power","mod"]

Input B

short-input

Placeholder: Second number

Layout: half

Condition: operation = ["add","subtract","multiply","divide","power","mod"]

Input Value

short-input

Placeholder: Number to process

Layout: half

Condition: operation = ["sqrt","abs","round","floor","ceil","sin","cos","tan","log"]

Input Numbers

long-input

Placeholder: Enter numbers separated by commas: 1, 2, 3, 4, 5

Layout: full

Condition: operation = ["min","max","avg","sum"]

Mathematical Expression

long-input

Placeholder: e.g., (a + b) * c / 2

Layout: full

Condition: operation = ["expression"]

Variables

long-input

Placeholder: {"a": 10, "b": 20, "c": 5}

Layout: full

Condition: operation = ["expression"]

Min Value

short-input

Placeholder: Minimum random value

Layout: half

Condition: operation = ["random"]

Max Value

short-input

Placeholder: Maximum random value

Layout: half

Condition: operation = ["random"]

Angle Unit

dropdown

Layout: half

Condition: operation = ["sin","cos","tan"]

Options: Radians, Degrees

Output Format

dropdown

Layout: half

Options: Number, String, Scientific, Percentage

Inputs (API)

operation

string

Optional

precision

number

Optional

inputA

number

Optional

inputB

number

Optional

inputValue

number

Optional

inputArray

string

Optional

expression

string

Optional

variables

json

Optional

minValue

number

Optional

maxValue

number

Optional

angleUnit

string

Optional

outputFormat

string

Optional

Outputs

Primary response type:

{
  "content": "string",
  "operation": "string",
  "result": "number",
  "inputs": "json",
  "expression": "string",
  "unit": "string",
  "precision": "number"
}

Tool Access

math_processor
Math | NowFlow Blocks