Docs

RunMacro Documentation

Learn RunMacro from basics to advanced.

Everything you need to start and master RunMacro — from basic commands to advanced automation workflows.

RunMacro robot
Docs Variables Calculate
🧮 Variables

Calculate a math expression into a variable in RunMacro

What it does

The Calculate command evaluates a math expression (add, subtract, multiply, divide, floor-divide, modulo, exponent) and stores the result in a variable. Reference numeric variables in the expression with [var_name].

When to use it

  • Increment/decrement a counter in a loop.
  • Compute a sum, difference, or derived value.
  • Process numbers before filling a form.

Configuration steps

  1. Add a Variables › Calculate command.
  2. Set the result variable.
  3. Enter the expression, using [var_name] for numeric variables (e.g. [count] + 1).
  4. Save.

Every option explained

Result variable

The variable that stores the computed result.

Expression

The arithmetic expression. Reference numeric variables via [var_name]; supports + - * /, floor-division //, modulo %, exponent **, and parentheses ( ).

Real example

Example: increment a counter each loop

  1. Declare Variable count = 0.
  2. In the loop: Calculate count = [count] + 1.
  3. Use {count} to show the run count.

Tips & common mistakes

In expressions, reference variables with [name] (square brackets), unlike {name} used in text fields.
RunMacro robot

Ready to automate smarter?

Download RunMacro and start automating your desktop, browser, and business workflows today.