Skip to content
MoneyDeck

Inverse Function Calculator

Find f⁻¹(x) algebraically and check it by composing f(f⁻¹(x)) = x

Updated · Free, no signup

Use x as the variable. Supports + − × ÷ ^, sqrt, cbrt, exp, ln, log10, sin, cos, tan.

Inverse function f⁻¹(x)

(3x + 2) / (x - 1)

f⁻¹ at your value

8

f(x₀)

3.5

f⁻¹(f(x₀)) — should equal x₀

5

Composition check

f⁻¹(f(5)) = f⁻¹(3.5) = 5 ✓
  • To find it, write y = f(x), swap x and y, and solve for y. The graphs of f and f⁻¹ are reflections of each other in the line y = x.
  • f⁻¹ is undefined at x = 1, the horizontal asymptote of f.

f(x), f⁻¹(x) and the mirror line y = x

About the Inverse Function Calculator

This inverse function calculator finds f⁻¹(x) algebraically. Type a function such as 2x + 3, (x + 2)/(x − 3), (x − 1)³ + 5, √(x − 4), 3·2ˣ or ln(x + 1), and it swaps the roles of input and output and solves for the original variable — undoing each operation in reverse order — then rewrites the answer in terms of x. Rational functions of the form (ax + b)/(cx + d), where x appears twice, are handled too.

It is designed for algebra 2 and pre-calculus students learning inverse functions, and for anyone who needs to reverse a formula, such as turning a Celsius-to-Fahrenheit rule into Fahrenheit-to-Celsius. The answer is checked by composition: the calculator evaluates f⁻¹(f(x₀)) at a test point and confirms you get x₀ back, and the graph shows f and f⁻¹ as mirror images across the line y = x.

Functions that are not one-to-one (like x², |x| or sin x) only have an inverse on a restricted domain. In those cases the calculator uses the standard principal branch — the non-negative square root or arcsin, for example — and tells you which restriction it assumed.

How to use the inverse function calculator

  1. 1Type the function using x as the variable, e.g. (x + 2)/(x - 3).
  2. 2Read the inverse function f⁻¹(x).
  3. 3Enter a test value x₀ to confirm f⁻¹(f(x₀)) = x₀.
  4. 4Enter any value to evaluate the inverse there.
  5. 5Check the graph: f and f⁻¹ should mirror each other across y = x.

Formula and method

y = f(x) → swap x and y → solve x = f(y) for y → f⁻¹(x) = y; check: f⁻¹(f(x)) = x

A function has an inverse when it is one-to-one: each output comes from exactly one input. To find the inverse, write y = f(x), interchange x and y, and solve for y. In practice this means undoing the operations applied to x in reverse order — subtract what was added, divide what was multiplied, take a root of a power, a logarithm of an exponential, an arcsine of a sine. For a rational function y = (ax + b)/(cx + d), cross-multiplying gives the inverse (dx − b)/(a − cx).

The inverse is verified by composition: f⁻¹(f(x)) = x for every x in the domain of f, and f(f⁻¹(x)) = x for every x in its range. The domain of f⁻¹ is the range of f. When f is not one-to-one (x², |x|, sin x), its domain must be restricted first; this calculator uses the conventional principal branch.

f⁻¹(x)
Inverse function — undoes f
x₀
Test point used for the composition check
y = x
Mirror line: f and f⁻¹ are reflections across it

Worked examples

Rational function (x + 2)/(x − 3)

Set x = (y + 2)/(y − 3), so x(y − 3) = y + 2, xy − y = 3x + 2 and y = (3x + 2)/(x − 1). Check: f(5) = 7/2 and f⁻¹(3.5) = 12.5/2.5 = 5. Also f⁻¹(2) = 8/1 = 8.

Linear: Celsius to Fahrenheit, f(x) = 1.8x + 32

Undo the steps in reverse: subtract 32, then divide by 1.8, so f⁻¹(x) = (x − 32)/1.8, the Fahrenheit-to-Celsius formula. 98.6 °F converts back to 37 °C.

Cubic: f(x) = (x − 1)³ + 5

Subtract 5, take the cube root, then add 1: f⁻¹(x) = ∛(x − 5) + 1. Since f(3) = 2³ + 5 = 13, the inverse sends 13 back to 3.

Exponential: f(x) = 3·2ˣ

Divide by 3 and take the base-2 logarithm: f⁻¹(x) = ln(x/3) ÷ ln 2 = log₂(x/3). For 96 that is log₂ 32 = 5.

Frequently asked questions

How do you find the inverse of a function?+

Replace f(x) with y, swap x and y, and solve the new equation for y. The result is f⁻¹(x). For f(x) = 2x + 3: x = 2y + 3, so y = (x − 3)/2.

How can I check that two functions are inverses?+

Compose them. If f(g(x)) = x and g(f(x)) = x for all x in the relevant domains, then g = f⁻¹. Numerically, pick a value, apply f and then the inverse, and you should get the original value back.

Does every function have an inverse?+

Only one-to-one functions do — those that pass the horizontal line test. f(x) = x² fails because f(2) = f(−2) = 4, but restricted to x ≥ 0 it has the inverse √x.

Is f⁻¹(x) the same as 1/f(x)?+

No. f⁻¹ is the inverse function that undoes f, while 1/f(x) is the reciprocal. For f(x) = 2x, f⁻¹(x) = x/2 but 1/f(x) = 1/(2x).

What is the inverse of an exponential function?+

A logarithm. The inverse of bˣ is log_b(x), and the inverse of eˣ is ln x. For a·bˣ the inverse is log_b(x/a) = ln(x/a) ÷ ln b.

Why are the graphs of f and f⁻¹ mirror images?+

If (a, b) lies on the graph of f, then (b, a) lies on the graph of f⁻¹. Swapping the coordinates of every point reflects the graph across the line y = x.

Related tools