Home › Calculators › Inverse Function Calculator

Inverse Function Calculator

Enter f(x) and get its inverse f⁻¹(x) with every algebra step. When f is not one-to-one, the calculator restricts the domain for you, gives the matching domain and range of the inverse, and plots f and f⁻¹ as mirror images in the line y = x.

Last updated:

Examples:

Use x as the variable: + − * / ^, sqrt, cbrt, abs or |x|, ln, log, e^x, sin, cos, tan, asin, acos, atan. Implicit multiplication like 2x works.

Inverse function
Domain of f
Range of f = domain of f⁻¹
Range of f⁻¹ = domain of f

Steps: swap x and y, then solve for y

    Graph: f, f⁻¹ and y = x

    f(x)f⁻¹(x)y = x

    Check: f⁻¹(f(x)) = x

    Advertisement
    Advertisement

    How to use the Inverse Function Calculator

    1. Type the function f(x), for example (2x + 1)/(x - 3), x^2 + 4x + 1 or e^(2x) + 1, or tap an example.
    2. Press Find inverse (or Enter).
    3. Read f⁻¹(x) at the top, with the domain and range of f and of its inverse.
    4. Pick a branch if asked: functions like x² are not one-to-one, so choose which half of the domain to keep.
    5. Follow the steps and check the graph: f and f⁻¹ are reflections of each other in the dashed line y = x.

    Inverses of common functions

    f(x)f⁻¹(x)Restriction needed on fDomain of f⁻¹
    mx + b (m ≠ 0)(x − b)/mNoneAll reals
    (ax + b)/(cx + d)(dx − b)/(a − cx)None (if ad − bc ≠ 0)x ≠ a/c
    x²√xx ≥ 0x ≥ 0
    a(x − h)² + k, a > 0h + √((x − k)/a)x ≥ hx ≥ k
    x³∛xNoneAll reals
    √xx²Nonex ≥ 0
    eˣln xNonex > 0
    bˣlog_b x = ln x / ln bNonex > 0
    ln xeˣNoneAll reals
    sin xarcsin x−π/2 ≤ x ≤ π/2[−1, 1]
    cos xarccos x0 ≤ x ≤ π[−1, 1]
    tan xarctan x−π/2 < x < π/2All reals
    |x|xx ≥ 0x ≥ 0

    Undo the operations in reverse order

    Solving x = f(y) for y is the same as undoing what f does, last step first. Read f(x) = 2·e3x − 5 as: multiply by 3, take e to that power, double it, subtract 5. The inverse runs backwards: add 5, halve, take ln, divide by 3, so f⁻¹(x) = ln((x + 5)/2)/3. Each "undo" is one line in the step list: subtracting undoes adding, dividing undoes multiplying, a root undoes a power, a logarithm undoes an exponential, and arcsin undoes sin.

    Checking your answer

    • Composition: f(f⁻¹(x)) = x for every x in the domain of f⁻¹, and f⁻¹(f(x)) = x for every x in the domain of f. The check table runs the second test with real numbers.
    • Points: if f(2) = 5, then f⁻¹(5) must be 2.
    • Graph: the two curves must be mirror images in y = x. If they cross, they cross on that line (or in symmetric pairs).
    • Domains: the domain of your formula for f⁻¹ should match the range of f. If it is larger, the formula only applies on part of it.

    Frequently asked questions

    How do you find the inverse of a function?

    Write y = f(x), swap x and y to get x = f(y), and solve that equation for y. The result is f⁻¹(x). For f(x) = 3x − 7: x = 3y − 7, so 3y = x + 7 and f⁻¹(x) = (x + 7)/3.

    Does every function have an inverse?

    Only one-to-one functions have an inverse function: each output must come from exactly one input. A quick test is the horizontal line test: if any horizontal line crosses the graph twice, the function is not one-to-one. f(x) = x² fails, but restricted to x ≥ 0 it passes and its inverse is √x.

    How do you find the inverse of a quadratic function?

    Complete the square first. For f(x) = x² + 4x + 1 = (x + 2)² − 3, swapping gives x = (y + 2)² − 3, so y + 2 = ±√(x + 3). Choosing the branch x ≥ −2 keeps the + sign: f⁻¹(x) = √(x + 3) − 2, with domain x ≥ −3.

    How do you find the inverse of a rational function?

    For f(x) = (ax + b)/(cx + d), swap to x = (ay + b)/(cy + d), multiply by (cy + d), collect the y terms and factor: y(cx − a) = b − dx. So f⁻¹(x) = (dx − b)/(a − cx). Example: (2x + 1)/(x − 3) has inverse (3x + 1)/(x − 2).

    How are the domain and range of f and f⁻¹ related?

    They swap: the domain of f⁻¹ is the range of f, and the range of f⁻¹ is the domain of f. For f(x) = eˣ (domain all reals, range (0, ∞)), the inverse ln x has domain (0, ∞) and range all reals.

    Why is the graph of the inverse a reflection in y = x?

    If (a, b) is on the graph of f, then f(a) = b and f⁻¹(b) = a, so (b, a) is on the graph of f⁻¹. Swapping coordinates is the same as reflecting across the line y = x.

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

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

    Are all the tools on FreeToolCabin tested for quality and accuracy?

    Yes! Every tool on our site undergoes automated Q/A testing in real browser environments to ensure high precision, correct output, and zero errors. If you happen to spot a bug or have a suggestion, please contact us at [email protected] and our team will review it right away.

    Related tools

    Domain and Range CalculatorFind the domain and range of a function in interval notation, with steps and a graph.Graphing CalculatorPlot multiple functions with zoom, pan, intersections and a value table.Inequality CalculatorSolve linear, quadratic, rational and absolute value inequalities with steps and a number line.Quadratic Equation SolverSolve ax² + bx + c = 0 with exact roots, steps, vertex and a parabola graph.Function Composition CalculatorFind f(g(x)), g(f(x)), f + g, f · g and f / g with values at a point and domains.X and Y Intercept CalculatorFind the x- and y-intercepts of lines, curves and functions with steps and a graph.Exponent CalculatorRaise any number to a power, including negative and fractional exponents.Logarithm CalculatorCalculate log in any base, ln, log10, log2 and antilog with change-of-base steps.Matrix CalculatorAdd, multiply, invert and row-reduce matrices up to 5×5 with exact fractions and steps.Prime Number CheckerCheck if a number is prime, factor it with a factor tree and list primes in a range.GCF and LCM CalculatorFind the GCF and LCM of two or more numbers with Euclid steps and prime factorization.Cubic Yard CalculatorConvert length, width and depth in any unit to cubic yards, cubic feet, m³ and material weight.Factorial CalculatorExact n! up to 5000! with digit count, trailing zeros and double factorial.Prime Factorization CalculatorFind prime factors in exponent form with a factor tree, divisor count and divisors list.Modulo CalculatorCalculate a mod n and the quotient, with floored, truncated and Euclidean rules.Exponential Growth CalculatorExponential growth and decay: final amount, rate or time, discrete or continuous.Linear Regression CalculatorLeast-squares line of best fit: slope, intercept, r, r², predictions and a scatter plot.System of Equations SolverSolve 2×2, 3×3 and 4×4 linear systems with exact fractions and step-by-step working.Cubic Equation SolverSolve ax³ + bx² + cx + d = 0 for real and complex roots with steps and a graph.Summation CalculatorEvaluate sigma notation: sum any expression in n from a to b with partial sums and a chart.Arithmetic Sequence CalculatorFind the n-th term, sum and full list of an arithmetic sequence, or d from two terms.Geometric Sequence CalculatorFind the n-th term, sum and infinite sum of a geometric sequence, or r from two terms.Fibonacci CalculatorExact n-th Fibonacci number (BigInt), sequence lists, Fibonacci check and golden ratio.Factors CalculatorAll factors and factor pairs of a number, prime factors, divisor count and perfect check.Depth of Field CalculatorNear and far focus limits, depth of field and hyperfocal distance for any camera or lens.Crop Factor CalculatorCrop factor, full-frame equivalent focal length and aperture, and field of view for any sensor.Completing the Square CalculatorRewrite ax² + bx + c in vertex form a(x − h)² + k step by step and solve it.Derivative CalculatorSymbolic derivative of any f(x) up to 5th order, with steps, slope at a point and a graph.Exposure Value CalculatorEV from aperture, shutter and ISO, or solve any missing setting with sunny 16 presets.Factoring Trinomials CalculatorFactor trinomials and polynomials: GCF, ac method, difference of squares, cubes, with steps.Integral CalculatorDefinite integral of f(x) from a to b with adaptive Simpson, area graph and antiderivative.Least Common Denominator CalculatorFind the LCD of two or more fractions and rewrite them as equivalent fractions, with steps.Limiting Reactant CalculatorFind the limiting reactant, theoretical yield and leftover excess from an equation.Parabola CalculatorVertex, focus, directrix, axis, intercepts and graph of a parabola from its equation.Polynomial Root FinderFind all real and complex roots of a polynomial up to degree 10, with the factored form.Prime Number List GeneratorList all primes in a range or the first N primes with a fast sieve; copy or download the list.Quadratic Regression CalculatorFit y = ax² + bx + c (or up to degree 6) to x, y data with R², predictions and a graph.Scatter Plot MakerPaste X,Y pairs for a scatter plot with trendline, equation, r and R². Download PNG.Partial Derivative CalculatorPartial derivatives ∂/∂x, ∂/∂y, second and mixed orders with steps, gradient and Hessian.RREF CalculatorRow reduce any matrix to RREF with exact fractions, every row operation, pivots and rank.Stem and Leaf Plot MakerMake stem-and-leaf plots (standard, split stems or back-to-back) with a key; copy or save PNG.Taylor Series CalculatorTaylor and Maclaurin polynomials of any f(x) to order n, with exact coefficients and a graph.Antilog CalculatorInverse logarithm (antilog) in base 10, e, 2 or any base, with steps and scientific notation.Asymptote CalculatorFind vertical, horizontal and slant asymptotes and holes of a function, with graph and reasoning.Cramer's Rule CalculatorSolve 2x2 and 3x3 linear systems by Cramer's rule with every determinant shown step by step.Dot Plot MakerMake a dot plot or line plot from data or a frequency table; download PNG or SVG.Exponential Regression CalculatorFit y = a·bˣ or y = a·e^(kx) to data with r², predictions, residuals and a plot.Extended Euclidean Algorithm CalculatorFind gcd(a, b) and Bézout coefficients x, y with the full step-by-step division table.Factor Tree GeneratorDraw the prime factor tree of any number as a printable diagram, with exponent form and steps.Line Intersection CalculatorFind where two lines cross from equations, points or slopes, with parallel checks and a graph.Linear Programming SolverSolve max/min linear programs with the simplex method: tableau steps and a 2-variable graph.Modular Exponentiation CalculatorCompute a^b mod m for huge numbers with square-and-multiply steps (BigInt).Modular Inverse CalculatorFind a⁻¹ mod m with the extended Euclidean algorithm, step by step, for huge numbers too.Nth Term CalculatorFind the nth term formula of a sequence: arithmetic, geometric, quadratic or cubic.Partial Fraction Decomposition CalculatorSplit a rational function into partial fractions with the setup, equations and solution.Perpendicular Line CalculatorEquation of the perpendicular and parallel line through a point, with distance and a graph.Polar Graphing CalculatorGraph polar equations r = f(θ): roses, cardioids, spirals, with a θ range slider and PNG export.Polynomial CalculatorAdd, subtract, multiply, divide and evaluate polynomials; see roots, degree and a graph.Polynomial Long Division CalculatorDivide polynomials with the full long division layout, quotient, remainder and steps.Scale Factor CalculatorScale factor between similar figures, plus scaled lengths, areas (k²) and volumes (k³).Set CalculatorUnion, intersection, difference and complement of up to 4 sets, with a Venn diagram and counts.Table of Values CalculatorMake an x/y table for any function with a start, end and step, then plot it or copy CSV.Synthetic Division CalculatorDivide polynomials by x − c (synthetic table) or any polynomial (long division) with steps.3D Graphing CalculatorPlot z = f(x, y) surfaces and 3D parametric curves; rotate, zoom, add contours, save PNG.Algebra CalculatorSimplify, expand and factor algebraic expressions with exact answers and step-by-step working.Determinant CalculatorDeterminant of a 2×2 to 8×8 matrix with exact fractions and cofactor or row-reduction steps.Differential Equation SolverSolve first- and second-order ODEs step by step, with initial conditions, an RK4 check and a graph.Eigenvalue and Eigenvector CalculatorEigenvalues (real or complex), eigenvectors and the characteristic polynomial of a square matrix.
    See all 74 Algebra & Calculus Calculators →