The inverse function calculator finds f⁻¹(x), the function that undoes f(x). Type a function such as 2x + 3, eˣ, ln(x + 4), √(x − 2), or a rational function like (2x + 1)/(x − 3), and the calculator swaps x and y, solves for the new y, and shows every algebra step. It graphs f and f⁻¹ together so you can see the reflection in y = x, warns you when a function is not one-to-one, and evaluates the inverse at any point with a check that f(f⁻¹(x)) returns x.
Inverse Function Calculator
Use x, + − * / ^, parentheses, sqrt, cbrt, exp, ln, log, log2, sin, cos, tan, e and pi.
Hover the graph: the point on f and its swapped twin on f⁻¹ light up together.
f sends each input to an output. The inverse runs every arrow backwards, from output to the input it came from.
What is an Inverse Function?
An inverse function f⁻¹ reverses f: if f(a) = b, then f⁻¹(b) = a. Feeding a value through f and then through f⁻¹ returns the value you started with.
Think of f as a machine. f(x) = 2x + 3 doubles a number and adds 3. Its inverse must undo those operations in reverse order: subtract 3, then halve. That gives f⁻¹(x) = (x − 3)/2.
- Points swap: every point (a, b) on f becomes (b, a) on f⁻¹.
- Graphs reflect: the curve of f⁻¹ is the mirror image of f across the line y = x.
- Domain and range trade places: the inputs of f⁻¹ are exactly the outputs of f.
- Composition gives x: f(f⁻¹(x)) = x and f⁻¹(f(x)) = x.
Pick a function and slide the point along it. Its mirror image across y = x traces out the inverse.
How to Find the Inverse of a Function?
Replace f(x) with y, swap x and y, then solve for y. The result is f⁻¹(x).
- Write y = f(x). For f(x) = 2x − 1 + 3, write y = 2x − 1 + 3.
- Undo the outermost operation first. Subtract 3: y − 3 = 2x − 1.
- Keep peeling. Take log base 2: log₂(y − 3) = x − 1, then add 1.
- Swap the names. x = log₂(y − 3) + 1 becomes f⁻¹(x) = log₂(x − 3) + 1.
Each operation is undone by its opposite: addition by subtraction, multiplication by division, powers by roots, exponentials by logarithms, and sine by arcsine. When x appears twice, as in (2x + 1)/(x − 3), cross-multiply first and collect every x term on one side.
Tap an example or type your own. Each line shows the operation that was undone.
How to Use This Inverse Function Calculator?
Type f(x) in the input box, choose a point to evaluate, and press "Find f⁻¹(x)." The calculator handles three kinds of functions:
Linear, power, root, exponential, logarithmic, and trigonometric functions such as 4(x − 1)³ or ln(x + 4). Each layer is peeled off in reverse order.
The calculator cross-multiplies, collects x, and returns (b − dx)/(cx − a) in simplified form.
ax² + bx + c is solved by completing the square, using the branch to the right of the vertex so the inverse is a true function.
Multiplication can be implied, so 2x, 3(x + 1), and 2sin(x) all work. If no closed form exists, the graph and the evaluator still find f⁻¹ at any point numerically.
Horizontal Line Test: Does f Have an Inverse?
A function has an inverse exactly when every horizontal line crosses its graph at most once. That means it is one-to-one: different inputs always give different outputs.
If a horizontal line y = c hits the graph twice, two different x values share the output c, and the inverse could not decide which one to return.
- Pass: x³, eˣ, ln x, 2x + 1, and arctan x are strictly increasing, so they are one-to-one.
- Fail: x², |x|, sin x, and x³ − 3x turn around, so some outputs repeat.
- Fix: restrict the domain to a piece that only rises or only falls, such as x ≥ 0 for x² or −π/2 ≤ x ≤ π/2 for sin x.
Move the line up and down. Red dots mark every crossing. Two or more crossings anywhere means no inverse.
Common Functions and Their Inverses
Click any row to load the function into the calculator.
| f(x) | f⁻¹(x) | Domain of f⁻¹ | Note |
|---|---|---|---|
| 2x + 3 | (x − 3)/2 | all reals | linear |
| 5 − x | 5 − x | all reals | self-inverse |
| 1/x | 1/x | x ≠ 0 | self-inverse |
| x², x ≥ 0 | √x | x ≥ 0 | restricted domain |
| x³ | ∛x | all reals | odd power |
| eˣ | ln x | x > 0 | exponential ↔ log |
| 10ˣ | log x | x > 0 | common log |
| 2ˣ | log₂ x | x > 0 | binary log |
| sin x | arcsin x | −1 ≤ x ≤ 1 | −π/2 ≤ x ≤ π/2 |
| tan x | arctan x | all reals | −π/2 < x < π/2 |
| (x + 1)/(x − 2) | (2x + 1)/(x − 1) | x ≠ 1 | rational |
| sinh x | arsinh x | all reals | hyperbolic |
Verifying an Inverse with Composition
Two functions f and g are inverses exactly when f(g(x)) = x and g(f(x)) = x for every x in their domains. This is the definitive test, and it is how teachers expect answers to be checked.
Take f(x) = 3x − 7 and g(x) = (x + 7)/3. Then f(g(x)) = 3·(x + 7)/3 − 7 = x, and g(f(x)) = (3x − 7 + 7)/3 = x. Both compositions return x, so g = f⁻¹.
Checking only one direction is not enough when domains are restricted. For f(x) = x² and g(x) = √x, f(g(x)) = x for x ≥ 0, but g(f(−3)) = √9 = 3, not −3. The pair is only inverse on x ≥ 0.
Send a number through f and then back through f⁻¹. A true inverse pair always returns the starting value.
Restricting the Domain to Make an Inverse
A function that fails the horizontal line test can still have an inverse on part of its domain. Keep only a piece where the graph rises or falls the whole way.
For the parabola f(x) = (x − h)² + k, the vertex at x = h splits the graph into two one-to-one halves:
- Right half, x ≥ h: f⁻¹(x) = h + √(x − k).
- Left half, x ≤ h: f⁻¹(x) = h − √(x − k).
The same idea gives the inverse trig functions. Sine is restricted to [−π/2, π/2], cosine to [0, π], and tangent to (−π/2, π/2), which is why arcsin and arccos always return angles in those ranges.
Move the vertex and choose which half to keep. The dashed half is thrown away, and the pink curve is the inverse of the kept half.
Other Inverse Calculators
Related tools that solve problems in reverse.
Turns F(s) back into f(t) with partial fractions, a pole-zero map, and a live time-response graph.
(3s+5)/(s²+3s+2) → 2e⁻ᵗ + e⁻²ᵗ Open calculator Finds a⁻¹ mod m with the extended Euclidean algorithm, a modular clock, and a congruence solver.
17⁻¹ mod 43 = 38 Open calculator Returns the x value or z-score for any area under a normal curve, with left, right, and central tails.
invNorm(0.975) = 1.9600 Open calculator Solves I₁d₁² = I₂d₂² for light, sound, gravity, and radiation, plus the reciprocal 1/x².
2× distance → 1/4 intensity Open calculator Inverts 2×2 to 6×6 matrices by Gauss-Jordan elimination with exact fractions and every row step.
A · A⁻¹ = I Open calculator Takes the antilog in base 10, e, 2, or any base, with characteristic, mantissa, and a log ruler.
antilog(2.5) = 316.23 Open calculator Solves y = k/x, k/x², and k/xⁿ problems, finds k, and shows the constant-product curve.
x × y = k = 24 Open calculator Finds the count k for a target probability, or the rate λ, with PMF bars and a CDF staircase.
qpois(0.95, 10) = 15 Open calculator Frequently Asked Questions
Answers to common questions about finding and using inverse functions
The inverse is f⁻¹(x) = (x − 3)/2. Write y = 2x + 3, subtract 3 to get y − 3 = 2x, divide by 2 to get x = (y − 3)/2, then swap the names x and y. Check: f(f⁻¹(5)) = 2·1 + 3 = 5.
No. Only one-to-one functions have an inverse, meaning no two inputs give the same output. f(x) = x² fails because f(2) = f(−2) = 4, so an inverse would not know whether to return 2 or −2. Restricting the domain to x ≥ 0 fixes this and gives f⁻¹(x) = √x.
No. f⁻¹(x) undoes f, while 1/f(x) is the reciprocal of the output. For f(x) = 2x, the inverse is f⁻¹(x) = x/2, but 1/f(x) = 1/(2x). At x = 4 these give 2 and 0.125. The −1 in f⁻¹ is notation for "inverse," not an exponent.
Because the inverse swaps every point (a, b) on f into (b, a), and swapping coordinates is a reflection in the line y = x. For example, f(x) = eˣ passes through (0, 1) and (1, e), so ln x passes through (1, 0) and (e, 1).
Compose them both ways: f(g(x)) and g(f(x)) must both simplify to x. For f(x) = x³ − 1 and g(x) = ∛(x + 1), f(g(x)) = (x + 1) − 1 = x and g(f(x)) = ∛(x³) = x, so they are inverses.
The inverse is (3x + 1)/(x − 2). Multiply y(x − 3) = 2x + 1, collect x terms to get x(y − 2) = 3y + 1, divide, and swap names. The vertical asymptote x = 3 of f becomes the horizontal asymptote y = 3 of f⁻¹.
The domain of f⁻¹ is the range of f, and the range of f⁻¹ is the domain of f. For f(x) = eˣ, the domain is all real numbers and the range is y > 0, so ln x accepts only x > 0 and returns any real number.