How this calculation works
Evaluate either real branch of Lambert W and check its defining inverse relation.
w exp(w)=x; W′(x)=W(x)/[x(1+W(x))] away from x=0 and the branch point.A worked example
At x=1, the principal branch gives W0(1)≈0.5671432904; multiplying this value by its exponential recovers1.
Good to know
Principal real branch−1/e≤x≤1e6; lower branch−1/e≤x<0. Bisection with logarithmic lower-branch evaluation. Infinite derivative at the branch point displayed explicitly; complex branches and a finite W−1(0) are unsupported.
Reference: NIST DLMF: Lambert W branches (opens in a new tab) ↗
An inverse with more than one branch
Lambert W reverses the map that sends w to w times its exponential. Unlike the ordinary logarithm, it solves an equation where the unknown appears both outside and inside the exponential. Many rearranged growth, waiting-time and transcendental balance equations lead to this structure.
The inverse is not single-valued throughout the real domain. Between minus one over e and zero, two different real values of w produce the same x. Choosing a branch is consequently part of the mathematical input, not a numerical option that should be silently selected for convenience.
Compare this with the Polynomial root calculator with iteration steps. Evaluate the multivalued inverse of w exp(w) with explicit real branch selection, rather than solve polynomial roots.
Principal and lower real branches
The principal branch W0 takes values at least minus one. It exists for every real x at or above minus one over e. The lower branch W−1 takes values at most minus one and exists for negative x between that branch point and zero.
Both meet at w equal to minus one when x equals minus one over e. As x approaches zero from below, W−1 tends to negative infinity rather than to zero. The page rejects x equal to zero on that branch instead of displaying a fabricated finite answer.
The omega-constant worked example
For the default x equal to one, the principal root is approximately 0.5671432904. Its exponential is about 1.7632228344, and their product is one. This gives a direct verification of the defining relation without using another inverse-function implementation.
The result is also the positive fixed point of exp minus w, often called the omega constant. That special name belongs to this particular input, not to all Lambert W outputs. Changing x changes the root while preserving the same product-based residual check.
Why the solver brackets each branch
On the principal branch, w times exp w is monotone increasing over the allowed w interval. A bracket between minus one and zero handles negative x, while nonnegative x uses a finite upper bound. Bisection then maintains the chosen inverse branch rather than jumping between real solutions.
For the lower branch, direct exponentiation can underflow far down the negative axis. The solver instead compares w plus log minus w with log minus x. This logarithmic equation preserves the ordering needed for bisection while avoiding a tiny intermediate product as the primary iteration test.
Residuals and sensitivity are different checks
The displayed residual is w times exp w minus x. A small residual indicates agreement with the defining equation at the entered value. It does not guarantee that w changes little when x changes, especially near a point where the forward derivative is close to zero.
At the branch point, that forward derivative vanishes and the inverse slope becomes unbounded. The two branches separate with a square-root behavior nearby. If x is a rounded measurement close to minus one over e, realistic input uncertainty can therefore dominate the many digits displayed for a computed root.
Using Lambert W in an equation
First rearrange the equation to exactly match u times exp u equals a known expression. Solve for u on every real branch permitted by the original problem, then transform u back to the original unknown. Additional domain restrictions may remove one of the formal solutions.
A branch choice should follow those restrictions. For example, positivity or a required time interval can select one candidate, while an unconstrained mathematical equation can retain two. This calculator evaluates the inverse function; it does not automatically establish the physical validity of a surrounding model.
Checks at special values
The principal branch has W0 zero equal to zero and derivative one there. Both branches return minus one at the real branch point. A positive x has only a principal real value, whereas a sufficiently negative x has no real value and must be rejected.
Use these cases to check branch conventions before comparing results from another package. Complex implementations often label branches by integer index and may return a small imaginary rounding component on a real boundary. This page stays within the explicitly supported real domains and does not approximate arbitrary complex branches.
A few questions, answered
Why can one input have two answers?
The forward map w exp(w) is not one-to-one below zero; the two real branches select different monotone portions.
Can I select W−1 for a positive input?
No. The lower real branch is defined only on the stated negative input interval.
What happens at x=0 on W−1?
The value diverges to negative infinity as a limit, so no finite result is returned there.
Does a tiny residual mean low sensitivity?
No. Near the branch point the inverse is highly sensitive even when its defining residual is small.