Station AcademyActivity referenceRPAi StationConsultingAurora Academy
Academy/Station Academy/Level 3/Numbers and calculations
Level 3 · Automation fundamentals

Numbers and calculations

Add, subtract, multiply, divide, round and count with the Math activity, and keep a running total.

Intermediate≈ 12 min (estimate)Windows, macOSWorkflow engine-tested
Before this lesson
Working with text
You will learn to
  • Use Math with numbers or variable names
  • Keep a counter or running total
  • Avoid common number pitfalls
Sample files
variables-and-text.station.json

The Math activity

Math takes an Operation, Operand 1, Operand 2 and a Save To Variable.

  • Operations: add, subtract, multiply, divide, modulo (remainder), power, round, floor, ceil, abs. The last four need only Operand 1.
  • An operand can be a number (1, 3.5) or the name of a variable (units, without braces).

A counter

  1. Set Variable count = 0 before the repetition.
  2. Inside the repetition: Math, add, Operand 1 count, Operand 2 1, Save To Variable count.

The same pattern keeps a running total: add the current value to total each time.

Pitfalls

  • Decimal point. Use a dot: 3.5, not 3,5. Values read from regional spreadsheets may need String Operation replace first.
  • Text that only looks like a number, such as 12 pcs, makes Math fail with must be a finite number. Clean it first.
  • Division by zero fails with a clear message. Check with an If Condition when the divisor can be zero.
  • Results are written without trailing zeros: 42, not 42.00. Format for people at the end, not in the middle.

Activities in this lesson

Math · Set Variable · Log

Saved only in this browser.

Workflow engine-tested. The sample workflow was executed with the macOS Station engine (StationCore) without the user interface. UI steps are source-verified. Written against RPAi Station for macOS 0.1.0 (1) (RPAi_Station_2.0 @ port/macos 9864e96) and the Windows source (RPAi_Station_2.0 @ codex/native-station e68f16d). Reviewed 2026-11-30. UI labels may differ slightly in other versions; see versions and changes.