Calculator icon

Calculator

Performs basic arithmetic operations (add, subtract, multiply, divide) on two numbers.

Divide

AI-generated

Overview

This node performs basic arithmetic operations (addition, subtraction, multiplication, division) on two numbers provided as inputs. It is useful in scenarios where simple mathematical calculations are needed within an automation workflow, such as calculating totals, differences, or ratios dynamically. For example, it can be used to divide sales revenue by the number of transactions to find the average sale amount.

Use Case Examples

  1. Calculating the sum of two values from incoming data.
  2. Subtracting expenses from income to find profit.
  3. Multiplying quantity by unit price to get total cost.
  4. Dividing total distance by time to calculate speed.

Properties

Name Meaning
First Number The first number (or dividend for division)
Second Number The second number (or divisor for division)

Output

JSON

  • result - The result of the arithmetic operation performed on the two input numbers

Troubleshooting

  • Division by zero error: The node throws an error if the second number (divisor) is zero during division. Ensure the divisor is not zero to avoid this error.
  • Unknown operation error: If an unsupported operation is selected, the node throws an error indicating the operation is unknown. Verify the operation input is one of the supported options (add, subtract, multiply, divide).

Links

Discussion