How to Use the Math Operation Action in Sparkforge Workflows

By Sparkforge Support Team ·Last reviewed May 3, 2026

The Math Operation action runs add, subtract, multiply, or divide on numeric and monetary fields, and adds or subtracts days, months, or years on date fields — useful for lead scoring, renewal dates, and commission calculations.

The Math Operation action lets workflows perform calculations on numeric, monetary, and date fields. Use it for lead scoring, renewal dates, commission math, project deadlines, or anything else that needs an arithmetic update inside an automation.

What it does

  • Add, subtract, multiply, or divide on numeric and monetary fields.
  • Add or subtract days, months, or years on date fields and the current date.
  • Pull operands from trigger data, custom fields, custom values, or static values.
  • Feed results into If/Else branches for routing and decisions.

How to add a Math Operation step

  1. Open or create a workflow in Automation > Workflows.
  2. Click Add Action and choose Math Operation.
  3. Select Field: pick the numeric, monetary, or date field whose value drives the math.
  4. Operation: choose addition, subtraction, multiplication, or division for numeric/monetary; add or subtract days, months, or years for dates.
  5. Operator value: enter a static number or insert a trigger value, custom field, or custom value.
  6. Update Field: select where the result is written — Standard Field, Custom Field, or Custom Value.
  7. Click Save, then publish the workflow.

Field type rules

Numeric fields

Hold whole numbers or decimals, positive or negative. Useful for lead scores, quantities, ratings, percentages.

Monetary fields

Hold currency values with a fixed precision. Negative results clamp to 0 — by design, so a discount that would yield a negative price doesn't charge a customer a negative amount.

Date fields and current date

Add or subtract days, months, or years. Negative values are not supported on date or current date fields. Use this for renewal dates, deadlines, anniversaries, and warranty expirations.

Constraints to remember

  • Each Math Operation step runs one operation. Chain multiple steps for compound calculations.
  • The Select Field and Update Field can be the same or different — but they must be the same field type.
  • If a numeric output goes negative, that's allowed. If a monetary output goes negative, it's replaced with 0.
  • You can't perform negative math on date fields.

Common combinations with If/Else

  • Lead routing: increment a lead score on each interaction, then branch hot/warm/cold for follow-up.
  • Renewal reminders: add subscription duration to start date, then check if the renewal date is within 14 days.
  • Commission math: multiply revenue by a rate, then alert reps who exceed a bonus threshold.
  • Project deadlines: add duration to start date, branch on whether the deadline is approaching or overdue.
  • Loyalty points: increment points per purchase, branch when a customer crosses a reward threshold.

Real-world use cases

  • Gym membership renewals — add 1 year to current expiration date.
  • Sales tax — multiply subtotal by tax rate.
  • Inventory reorder triggers — subtract sold quantity from stock and branch when low.
  • Late fees — multiply daily rate by days overdue.
  • Age verification — subtract birthdate from current date.
  • Customer lifetime value — multiply average order value by purchase frequency.

Frequently Asked Questions

Can I run multiple math operations in one workflow step?
No. Each Math Operation step runs a single calculation. Chain multiple steps in sequence for compound math.
How does Sparkforge handle decimal precision?
Standard system precision applies automatically. If you need specific rounding, add explicit logic in the workflow before or after the math step.
Can I do math on custom date fields?
Yes. The Math Operation step works on custom date fields the same way it works on standard date fields — add or subtract days, months, or years.
Can the result of a math step drive an If/Else branch?
Yes. The updated field is available downstream in the workflow, so If/Else can read it and route accordingly.
Do negative results work everywhere?
Numeric fields accept negative values. Monetary fields clamp negative results to 0. Date and current date fields don't support negative results at all.

Was this article helpful?