SUBTRACTION (-)

'Node1' - 'Node2'

In Arithmetic operators

The SUBTRACTION operator subtracts one input from another after aligning both inputs to their common dimensions. In other words, subtraction uses the intersection of the shared dimensions.

The result keeps the coarser level in each shared dimension. Dimensions that exist on only one side are aggregated away.

Use this operator to calculate differences between two nodes: 'Revenue' - 'OPEX'.

Parameters

Node1Node referenceRequired
Minuend node, specified using the node name in single quotes (e.g.'Revenue')
Node2Node referenceRequired
Subtrahend node, specified using the node name in single quotes (e.g.'OPEX')

Output shape

Dimensionality
Both inputs are aggregated to their common dimensions (the intersection of the shared dimensions). Per shared dimension, the coarser level is used. Dimensions that exist on only one side are aggregated away.
Level values
Non-matching level values are preserved in the result.
Row count
Equal or reduced, depending on how much aggregation is required before subtracting.

Watch out

  • Subtraction uses the common dimensions (intersection), just like addition.
  • Dimensions that exist on only one side are aggregated away before subtracting.
  • When subtracting a constant such as 'Revenue' - 100, the node is aggregated first and the constant is then subtracted from the total.
  • We recommend storing costs as negative values where possible, so addition can be used consistently throughout the model.
  • Both sides must have the same unit, unless one side is a scalar value.

Examples

Subtracting nodes with matching dimensions

Input node: 'Revenue'

YearValue
2025500
2026600
2027550

Input node: 'Cost'

YearValue
2025300
2026350
2027400

Formula: 'Revenue' - 'Cost'

YearCalculationResult
2025500 - 300200
2026600 - 350250
2027550 - 400150

Subtracting nodes with different level values

When level values do not overlap, subtraction preserves both values in the result. The value from the second input appears as negative.

Input node: 'A'

YearValue
2025100

Input node: 'B'

YearValue
202640

Formula: 'A' - 'B'

YearSUBTRACTION Result
2025100
2026-40

Subtracting nodes with different dimensionality

This example shows how subtraction aggregates Node B to the common dimensions before subtracting it from Node A.

Input node: 'Node A'

YearValue
20255
202610

Input node: 'Node B'

YearProductValue
2025A2
2026A3
2026B4

Formula: 'Node A' - 'Node B'

YearCalculationResult
20255-23
202610-(3+4)3

See also

ADDITION (+)
When you want to combine values across the same shared-level alignment logic but add them instead of subtracting them.
MULTIPLICATION (*)
When you want to multiply values instead of subtracting them.
Was this page helpful?

Last reviewed April 10, 2026