Inverse Function Calculator

Enter a function of x to swap x and y and solve for the inverse.

Use x, + − × ÷ ^, brackets, sqrt, abs, ln, log and e.

Try

Result

You enteredf(x)=2xf\left(x\right) = 2^{x}

f−1(x)=log⁡2x\displaystyle f^{-1}\left(x\right) = \log_{2} x

Domain of the inverse

x>0\displaystyle x > 0

Check

f(f−1(x))=x\displaystyle f\left(f^{-1}\left(x\right)\right) = x
Show the work
  1. Writing y for f(x)

    Replace f(x)f(x) with yy, so that the output has a letter of its own to work with.

    y=2xy = 2^{x}
  2. Swapping x and y

    An inverse function undoes ff, so inputs and outputs trade places. Swap the letters xx and yy, then solve for the new yy.

    x=2yx = 2^{y}
  3. Logarithm undoes an exponential

    The logarithm to base 22 is the inverse operation of raising 22 to a power. Taking it on both sides turns the exponent yy into a plain yy.

    Using y=log⁡bx  ⟺  by=xy = \log_{b} x \iff b^{y} = x

    y=log⁡2xy = \log_{2} x
  4. Domain of the inverse

    The domain of the inverse is the range of ff. An exponential is positive, so ff stays above 00 and never reaches it. The logarithm needs a positive argument, which says the same thing.

    x>0x > 0
  5. Result

    So the inverse function is f−1(x)=log⁡2xf^{-1}\left(x\right) = \log_{2} x.

Worked examples