Math

MapRange

Rescales a number, or every number in a column, from one range onto another, for example turning raw dollar figures into a 0–100 score. A value at the bottom of the input range maps to the bottom of the output range, the top maps to the top, and everything in between keeps its proportional position.

Inputs

InputAcceptsRequired
ValueAnyYes
FromMinValue (a single number)Yes
FromMaxValue (a single number)Yes
ToMinValue (a single number)Yes
ToMaxValue (a single number)Yes

Outputs

OutputProduces
ResultAny

Settings

Typed in on the node or set by the assistant, not wired.

SettingDefaultNotes
FromMin0Bottom of the input range. Default 0.
FromMax100Top of the input range. Default 100.
ToMin0Bottom of the output range. Default 0.
ToMax1Top of the output range. Default 1.

Example

You are building a branch scorecard where each metric should read on a 0–100 scale. Branch revenue runs from $1.2M to $4.8M, so set FromMin to 1200000, FromMax to 4800000, ToMin to 0, ToMax to 100. A branch at $3.0M lands at exactly 50; one at $4.35M scores 87.5. Repeat with a second MapRange for cost efficiency and the two scores are directly comparable on one chart.

Tips

Values outside the input range are not cut off; a branch at $5.1M would score above 100. Add a Clamp node after MapRange if scores must stay inside the target range.

Related nodes