Calculator icon

Calculator

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

Subtract

AI-generated

Overview

This node performs basic arithmetic operations (add, subtract, multiply, divide) on two numbers. It is useful in scenarios where simple mathematical calculations are needed within an automation workflow, such as adjusting values, computing differences, or scaling numbers. For example, it can subtract expenses from income to calculate net profit or subtract a discount amount from a price.

Use Case Examples

  1. Subtracting two numbers to find the difference between values in financial calculations.
  2. Subtracting a discount value from a product price in an e-commerce workflow.

Properties

Name Meaning
First Number The first number (or dividend for division) used in the arithmetic operation.
Second Number The second number (or divisor for division) used in the arithmetic operation.

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 is zero during a division operation. To resolve, ensure the divisor is not zero.
  • Unknown operation error: If an unsupported operation is specified, the node throws an error. Verify the operation parameter is one of add, subtract, multiply, or divide.

Discussion