gizmobench
BrowseDaily

Inverse Function Calculator

Enter f(x) and press Find inverse for a formula, domain, working and mirrored graph. The formula field reads linear, fractional-linear, power, exponential and logarithmic families with rational coefficients. Even powers require a branch choice; unsupported expressions are refused. The separate table control swaps finite x, y pairs exactly, while the numeric trig control evaluates approximate principal arcsin, arccos and arctan angles.

Your function

Example input

Domain restriction

None needed: f is one-to-one on its domain.

Plot range for both x and y

Reads linear, fractional-linear, power, exponential and logarithmic functions of x with exact rational coefficients, such as 2x + 3, (x + 7)/(3x + 5), x^2 - 6x + 5, sqrt(2x + 1), 3·2^(x - 1) + 5 and ln(x - 2) + 1. Use numbers, x, + - * / ^ and brackets, with sqrt, cbrt, exp, ln, log (base 10), log2 and log_b(x). 2x means 2 times x, and 1/2x is read as x/2. Exponents and polynomial degrees go up to 12.

Result

f⁻¹(x) = (x - 3)/2

Read as f(x) = 2x + 3, a linear function.

(1, 5)(5, 1)-4-4-2-200224466ff⁻¹y = x

Text equivalent: Graph for x and y from -4 to 6: f(x) = 2x + 3 in teal and f⁻¹(x) = (x - 3)/2 in amber, mirrored across the dashed line y = x. The point (1, 5) on f pairs with (5, 1) on f⁻¹.

Inverse found: f⁻¹(x) = (x - 3)/2.

Inverse
f⁻¹(x) = (x - 3)/2
Excluded points
none
Check f(f⁻¹(y))
f(f⁻¹(5)) = f(1) = 5
Check f⁻¹(f(x))
f⁻¹(f(2)) = f⁻¹(7) = 2

Domain and range

FunctionFormulaDomainRange
f2x + 3all real xall real y
f⁻¹(x - 3)/2all real xall real y

Working

  1. Write y = f(x): y = 2x + 3.
  2. Solve for x: x = (y - 3)/2.
  3. Swap x and y: f⁻¹(x) = (x - 3)/2, for all real x.

Composition checks

Each point goes through f and then f⁻¹, and back, in exact fractions. Points are chosen where every value is rational, so equality is exact rather than rounded.

xf⁻¹(f(x)) = xf(f⁻¹(y)) = y
1f⁻¹(f(1)) = f⁻¹(5) = 1f(f⁻¹(5)) = f(1) = 5
2f⁻¹(f(2)) = f⁻¹(7) = 2f(f⁻¹(7)) = f(2) = 7
3f⁻¹(f(3)) = f⁻¹(9) = 3f(f⁻¹(9)) = f(3) = 9

Inverse from a table

Enter one x, y pair per line, separated by a comma, tab or spaces. Numbers and fractions are read exactly, up to 128 characters in each numerator or denominator and 32000 characters per table. This swaps the supplied pairs; it does not infer a formula or values between rows. Table input is not saved.

Enter x and y pairs to invert a table.

Principal inverse trig angle

Evaluate arcsin, arccos or arctan of a numeric value. Results are approximate principal angles in radians and degrees, rounded to 12 significant digits. This does not symbolically invert a trig expression. Numeric input is not saved.

Enter a value for the principal inverse trig angle.

Worked examples

  • f(x) = 2x + 3linear example
    (x - 3)/2
  • f(x) = x^2 on the branch x ≥ 0power example
    sqrt(x) for x ≥ 0
  • f(x) = (x + 7)/(3x + 5)fractional-linear example
    (7 - 5x)/(3x - 1) for x ≠ 1/3
  • f(x) = 3·2^(x - 1) + 5exponential example
    log_2((x - 5)/3) + 1 for x > 5
  • f(x) = ln(x - 2) + 1logarithmic example
    e^(x - 1) + 2

Common questions

How do I find the inverse of a function?
Write y = f(x), solve for x, then swap the letters. The page shows those three steps under the answer. For f(x) = 2x + 3 they read y = 2x + 3, then x = (y - 3)/2, then f⁻¹(x) = (x - 3)/2. The inverse undoes f: f(1) = 5 and f⁻¹(5) = 1, and both of those checks are listed with the result.
Why does x^2 need a domain restriction?
Because two inputs give the same output: f(1) = f(-1) = 1, so there is no single way back from 1. A function has an inverse only where it is one-to-one, so the page shows no inverse for x^2 until you choose a branch. Choose x ≥ 0 and the inverse is sqrt(x); choose x ≤ 0 and it is -sqrt(x). Both hold for x ≥ 0. The same choice appears for any even power, such as (x - 3)^2 - 4, with the branches split at its vertex, x = 3.
What is the inverse of (x + 7)/(3x + 5)?
(7 - 5x)/(3x - 1). A fractional-linear function leaves out one input and never reaches one output: here x = -5/3 makes the denominator zero, and f never equals 1/3, which is exactly where the inverse's own denominator is zero. The page lists both as excluded points, x = -5/3 from f and x = 1/3 from f⁻¹, and checks the result at x = 1, 2 and 3: for example f(2) = 9/11 and f⁻¹(9/11) = 2.
Which functions can this calculator invert?
The formula field reads five families, each with exact rational coefficients and a linear expression inside: linear, such as 2x + 3; fractional-linear, such as (x + 7)/(3x + 5); power, such as x^3, sqrt(2x + 1) and 1/(x - 1)^2 + 3; exponential, such as 3·2^(x - 1) + 5 and e^(2x); and logarithmic, such as ln(x - 2) + 1 and log_2(x + 3). A polynomial is expanded first, so every quadratic works, by completing the square, and a higher degree works when it is one shifted power a(x - h)^n + k. Exponents and polynomial degrees go up to 12. Anything else, such as sin(x), x^3 + x or x·e^x, is refused with the reason instead of an approximate answer.
How is the inverse checked?
In exact fractions, before anything is shown. Up to three sample points where every value is rational are pushed through f and then f⁻¹, and back: for 2x + 3 the page lists f⁻¹(f(1)) = f⁻¹(5) = 1 and f(f⁻¹(5)) = f(1) = 5, then the same at x = 2 and 3. If a check failed, the page would show an error instead of a formula. With base e only one such point exists, where the exponent is 0, so e^x is checked at f(0) = 1 and f⁻¹(1) = 0.
What are the excluded points?
Inputs that f cannot take and outputs it never reaches, listed for f and for f⁻¹. A denominator zero is one: 1/x leaves out x = 0 from both. A cancelled factor is another: (x^2 - 1)/(x - 1) is read as x + 1, but x = 1 is still excluded, so its inverse, x - 1, excludes x = 2, and the graph marks both gaps with open circles. A domain that stops at a boundary, such as x > 2 for ln(x - 2) + 1, is shown in the domain and range table instead.
How do I read the graph?
f is drawn in teal and f⁻¹ in amber, with the dashed line y = x between them. Both axes share one range, -4 to 6 until you change it, so the inverse is a true mirror image: for 2x + 3 the point (1, 5) on f is joined to (5, 1) on f⁻¹. When you choose a branch, the unused half of f is drawn faint and dashed. A text version of the graph sits under it, and Download SVG saves the same drawing.
How should I type the function?
Type the right-hand side, or start with f(x) = or y =. Use ^ for powers, as in x^2 and 2^(x - 1), or the superscripts ², ³ and ⁻¹. The functions are sqrt, cbrt, exp, ln, log (base 10), log2 and log_b(x), as in log_2(x + 3). A missing multiplication sign is read left to right, so 2x is 2 times x and 1/2x is read as x/2; the Read as line under the answer shows how your input was read. e is read only as the base of an exponential, so write e^(2x) with brackets.
Can I copy or save the result?
Copy result puts the formula, the family, both domains and ranges, the excluded points and every check on the clipboard as text. Download SVG saves the graph as it is drawn. Both stay off until the current f(x) has an inverse, and the download also needs a valid plot range. Everything is worked out in your browser, and the last function you submitted yourself is remembered on this device, not sent anywhere.
Can I find an inverse from a table of values?
Yes. Enter numeric x, y pairs in Inverse from a table, one pair per line. The result swaps the columns and lists the finite inverse domain and range. Repeated identical pairs are removed. If one input has different outputs, the original table is not a function; if different inputs share an output, it has no inverse function. Values between rows and a continuous formula are not inferred.
Can I calculate inverse sine, cosine or tangent?
Use Principal inverse trig angle and enter a decimal or scientific-notation value. Arcsin and arccos accept values from -1 to 1; arctan accepts any finite value. The result shows the principal branch, steps, and approximate radians and degrees rounded to 12 significant digits. This numeric calculation is separate from the formula field, which still refuses trig expressions such as sin(x).
What is a self-inverse function?
Its inverse is the same function. Enter 1/x to see f⁻¹(x) = 1/x, with zero excluded from both domains. The composition checks show that applying it twice returns the starting value. This tests the calculated inverse at the displayed sample points; it does not compare an arbitrary second formula.

Exact for the five families this page reads: linear, fractional-linear, power, exponential and logarithmic functions with rational coefficients and a linear expression inside. It is not a general symbolic solver: any other expression is refused as unsupported, and a function that is not one-to-one on its whole domain gets an inverse only after you choose a narrower branch.