Inverse Lerp

Tells how far a number is between two others, as a t.

Node id math/inverse-lerp

The Inverse Lerp node does the opposite of Lerp: it outputs the fraction t of the way from a to b at which value lies. With a = 10 and b = 20, 10 gives 0, 15 gives 0.5 and 20 gives 1.

Parameters

NameTypeDefault
clampbooleanfalse

Inputs

NameTypeDefaultNotes
valuenumber0.5
anumber0
bnumber1

Outputs

NameTypeNotes
tnumber

Behaviour

  • Defaults. value defaults to 0.5, a to 0 and b to 1.
  • Not clamped by default. A value beyond the ends gives a t outside 0 to 1: with a = 10 and b = 20, 30 gives 2 and 0 gives -1. Turn on the clamp parameter (on the node or in the property inspector) to keep t from 0 to 1.
  • Reversed ends (a greater than b) are not an error: t counts from a, so with a = 20 and b = 10, 12 gives 0.8.
  • Equal ends (a = b) divide by zero, like Divide: the result is Infinity, -Infinity, or NaN when value equals them too (clamped or not). There is no node error.
© 2026 Wirepaint