Inverse function calculator
Type a function to find its inverse, f⁻¹(x), step by step. You also get the domain and range of the inverse, and a graph showing the two functions as mirror images. If the function isn’t one-to-one, you get the inverse of each restricted branch.
- Write y = (x − 1)/(x + 2)
- Swap x and y: x = (y − 1)/(y + 2)
- Multiply both sides by the denominator: x(y + 2) = y − 1
- Collect the y terms on one side, then factor out y: y(x − 1) = −2x − 1
- Divide to get y on its own: y = (2x + 1)/(1 − x)
- Check: f(1) = 0, and f⁻¹(0) = 1
Checked: putting the inverse into f gave x back at several points before this was shown.
Open in the graphing calculator →How to find an inverse here
- 1Type your function of x, such as
2x + 3,(x - 1)/(x + 2),x^3ore^x. - 2Read the inverse and its domain and range.
- 3Check the graph: the function and its inverse are mirror images in the line y = x.
How to find an inverse function by hand
Swap x and y, then solve for y. For f(x) = 2x + 3:
- Write y = 2x + 3.
- Swap x and y: x = 2y + 3.
- Subtract 3: x − 3 = 2y.
- Divide by 2: y = (x − 3)/2.
So f⁻¹(x) = (x − 3)/2. To check it, follow one value through both. f(5) = 13, and f⁻¹(13) = 5. The guide to inverse functions explains why this works.
Common inverse pairs
| Function | Inverse | Note |
|---|---|---|
| x + a | x − a | |
| ax | x/a | a ≠ 0 |
| x³ | ∛x | |
| x² | √x | Only for x ≥ 0 |
| eˣ | ln(x) | The inverse needs x > 0 |
| 10ˣ | log(x) | The inverse needs x > 0 |
| sin(x) | arcsin(x) | Only for −π/2 ≤ x ≤ π/2 |
| tan(x) | arctan(x) | Only for −π/2 < x < π/2 |
| 1/x | 1/x | Its own inverse |
When does a function have an inverse?
Only if it’s one-to-one, meaning no two inputs give the same output. On a graph, this is the horizontal line test: if any horizontal line crosses the curve more than once, the function has no inverse over its whole domain.
f(x) = x² fails the test, since f(2) and f(−2) are both 4. An inverse would need to send 4 to two places at once. The fix is to restrict the domain. On x ≥ 0 the inverse is √x, and on x ≤ 0 it’s −√x. This calculator shows both branches.
Domain and range swap
The domain of the inverse is the range of f, and the range of the inverse is the domain of f. That matters when a formula alone would suggest more. The inverse of f(x) = √x is written x², which looks defined everywhere. But √x only outputs numbers from 0 upward, so the inverse is x² for x ≥ 0 only. To find these for any function, use the domain and range calculator.
When there’s no formula
Some functions have an inverse that can’t be written with ordinary functions. f(x) = x³ + x is one-to-one, so an inverse exists, but x can’t be isolated without the general cubic formula. f(x) = x eˣ needs a special function, the Lambert W. In these cases, the calculator says so rather than guessing. You can still see the inverse on a graph, by reflecting the curve in y = x in the graphing calculator.
Frequently asked questions
What is an inverse function?
Does f⁻¹(x) mean 1/f(x)?
How do I check my inverse?
Why are the two graphs mirror images?
Why does x² have two answers?
Is it free?
Related tools and guides
Reflect in y = x; the horizontal line test.
Any function’s domain and range, in interval notation with steps and a graph.
Defined for x > 0, through (1, 0) and (e, 1).
Starts at the origin; half of a sideways parabola.
Domain [−1, 1], range [−π/2, π/2]; sin x reflected in y = x.
Logarithms in any base, with ln, log₂, the antilog and a graph.
Graph any function and its inverse together in the calculator, and change the formula as you go.