Inverse Function Calculator
Find inverse function value for y=mx+b.
Formula
f⁻¹(y) = (y-b)/m
Example
y=14, f(x)=3x+2 → x=4.
Embed this calculator on your site
Add this free calculator to your own website with one line of code. The embedded version is responsive, ad-free, and includes a small attribution link back to CalcNest AI.
<iframe src="https://calcnestai.com/embed/inverse-function-calculator.html" width="100%" height="700" frameborder="0" style="border: 1px solid #e5e5e5; border-radius: 12px; max-width: 720px;" loading="lazy" title="Inverse Function Calculator — Free Tool by CalcNest AI"></iframe>
Understanding the Inverse Function Calculator
An inverse function calculator reverses a linear function, solving for the input that produced a given output. Only some functions have inverses, and the condition is that the function must be one-to-one, which is why the calculator refuses when the slope is zero.
How it actually works
Enter an output value along with the slope and intercept of a linear function. The calculator rearranges to solve for the input. For f(x) equal to 2x plus 3, an output of 11 gives an input of 4.
| Function | Invertible? |
|---|---|
| f(x) = 2x + 3 | Yes, one-to-one |
| f(x) = 5 (constant) | No, slope zero |
| f(x) = x² | No, unless domain restricted |
| f(x) = sin x | No, unless domain restricted |
The deeper context most people miss
Squaring and sine both fail because different inputs give the same output, so reversing is ambiguous. Restricting the domain fixes it, which is exactly why the square root returns only the positive value and why arcsine returns only angles between minus 90 and 90 degrees.
Why inverse functions need restricted domains
A function has an inverse precisely when it is injective, meaning no two inputs share an output, since otherwise reversing would require choosing between them arbitrarily. Squaring is the standard example: both 3 and minus 3 give 9, so there is no single answer to what was squared. The convention restricts the square root to non-negative results, which makes it a genuine function at the cost of discarding half the information, and this is why solving an equation by taking square roots requires the plus or minus that the function itself does not provide. Trigonometric functions are periodic and therefore massively non-injective, so the inverse functions restrict to a principal branch: arcsine returns values between minus π over 2 and π over 2, arccosine between 0 and π, and arctangent between minus π over 2 and π over 2. The consequence is that arcsine of sine of x does not always return x, only when x lies in the principal range, which is a genuine trap in code that assumes the operations cancel. The two-argument arctangent exists specifically to recover the full angle from coordinates rather than from a ratio, and using the single-argument version instead is a recurring bug. Logarithms invert exponentials and are restricted to positive arguments because exponentials never produce zero or negative outputs. Complex logarithms are multivalued and require a branch cut, which is where several subtle numerical issues in complex arithmetic originate.
A worked example: what the inverse really does
For f(x) equal to 2x plus 3, an output of 11 came from an input of 4, obtained by subtracting the intercept and dividing by the slope. Two properties characterise the inverse. Composing a function with its inverse in either order returns the original input, which is the defining relationship and is worth checking as a verification step whenever an inverse is derived by hand. Graphically, the inverse is the reflection of the function across the line y equals x, since swapping the roles of input and output swaps the axes, which makes it visually obvious why a function failing the horizontal line test cannot have an inverse: the reflection would fail the vertical line test and therefore not be a function. Deriving an inverse algebraically means solving the original equation for x in terms of y and then relabelling, and the relabelling step is what confuses people since it looks like a sleight of hand while merely restoring the convention that the input variable is called x. For linear functions the derivation is trivial and the slope of the inverse is the reciprocal of the original, which is a general property visible in the reflection: a steep function has a shallow inverse. That reciprocal relationship extends to derivatives, where the derivative of an inverse function at a point is the reciprocal of the original function's derivative at the corresponding point.
Deciding where inverses matter practically
Inverse operations appear wherever a process must be undone or a cause inferred from an effect. Unit conversion is an inverse pair, and any conversion function should have an exact inverse, which is why conversion factors are defined exactly rather than approximated. Encryption and decryption are inverse operations, and the requirement that decryption exists is what distinguishes encryption from hashing, which is deliberately not invertible. Encoding and decoding in data formats. Logarithms and exponentials in scaling calculations. In statistics, quantile functions are inverse cumulative distributions and are what generate random values from a distribution by transforming uniform random numbers, which is the inverse transform sampling method. In machine learning, link functions in generalised linear models are inverted to convert predictions back to the response scale, and forgetting to invert is a common error producing predictions on the wrong scale entirely. In control systems, an inverse model predicts what input produces a desired output. Inverse problems more generally, inferring causes from observations, are a substantial field in their own right and are frequently ill-posed, meaning small measurement errors produce large errors in the inferred cause, which is why medical imaging reconstruction and geophysical inversion require regularisation rather than direct inversion.
Ill-posed inverse problems and why they need regularisation
Forward problems compute effects from causes and are usually well behaved. Inverse problems reverse that, and they frequently violate one of the conditions Hadamard identified for a well-posed problem: a solution exists, it is unique, and it depends continuously on the data. The third condition is the one that fails most damagingly, since it means arbitrarily small measurement noise can produce arbitrarily large errors in the reconstructed answer. Computed tomography reconstructs internal structure from projections and is a classic example, and naive inversion amplifies noise into unusable images, which is why filtered back projection and iterative reconstruction with regularisation are used instead. Deconvolution to sharpen a blurred image has the same character, which is why naive deconvolution produces noise-dominated results and why regularised methods are necessary. Seismic inversion infers subsurface structure from surface measurements. Estimating a distribution from limited samples. In each case the mathematical response is regularisation, adding a penalty that favours plausible solutions and stabilises the inversion, with Tikhonov regularisation being the classical approach and its statistical counterpart being the prior in Bayesian inference. The general lesson is that being able to write down an inverse does not mean computing it is stable, and that additional assumptions are usually required to make an inverse problem answerable at all.
Variations: inverse operations across mathematics
Addition and subtraction, multiplication and division, and exponentiation and logarithms are the elementary inverse pairs, with exponentiation having two inverses since it is not symmetric in its arguments: roots invert the base and logarithms invert the exponent. Trigonometric and inverse trigonometric functions pair with restricted domains. Hyperbolic functions have their own inverses. Matrix inverses undo linear transformations and exist only when the determinant is non-zero, with the pseudoinverse extending the idea to non-square and singular cases and underlying least squares solutions. Function composition has inverse composition. Derivatives and integrals are inverse operations in the sense of the fundamental theorem of calculus, with the caveat that indefinite integration recovers the function only up to an additive constant, which is exactly the information differentiation discards. Laplace and Fourier transforms have inverse transforms and are used precisely because a difficult operation in one domain becomes easy in the other. In each case the same pattern holds: the inverse exists when the forward operation loses no information, and where information is lost the inverse requires either a convention or additional input to resolve the ambiguity.
Working with inverse functions
Check that a function is one-to-one before seeking an inverse, since functions taking the same value at different inputs cannot be reversed unambiguously. Restrict the domain where necessary, which is what makes the square root and the inverse trigonometric functions well defined. Verify an inverse by composing it with the original in both directions, which should return the input and is a quick check on algebra. Remember that arcsine of sine of x returns x only within the principal range, so the operations do not universally cancel. Use the two-argument arctangent to recover an angle from coordinates rather than the single-argument version, which loses the quadrant. Note that the inverse is the reflection across the line y equals x, which makes the horizontal line test for invertibility visually obvious. Remember that indefinite integration recovers a function only up to a constant, since differentiation discards it. Expect inverse problems on measured data to be unstable, requiring regularisation rather than direct inversion. And check that predictions from generalised linear models have been transformed back through the inverse link before interpreting them.
What people get wrong
- Assuming every function has an inverse, when only one-to-one functions do and squaring, sine, and any periodic function fail without a domain restriction.
- Expecting arcsine of sine of x to return x for any x, when inverse trigonometric functions return only principal values and the operations cancel only within that range.
- Using single-argument arctangent to recover an angle from coordinates, which cannot distinguish opposite quadrants where the two-argument version resolves it.
- Inverting measured data directly, when inverse problems are frequently ill-posed and small measurement errors amplify into large errors without regularisation.
Where the math comes from
For f(x) = mx + b with m ≠ 0, the inverse is f⁻¹(y) = (y − b)/m. An inverse exists precisely when the function is one-to-one, since otherwise reversing is ambiguous. Composing a function with its inverse in either order returns the original input, and graphically the inverse is the reflection of the function across the line y = x.
Questions and answers
What is the difference between percent and percentage point?
Percent change is relative (going from 5% to 10% is a 100% increase). Percentage point change is absolute (the same shift is a 5 percentage point increase). News stories often confuse these.
How do I calculate a discount?
Discount amount = original x discount %. Final price = original x (1 - discount %). For 20% off $100: discount $20, final $80.
What is the formula for compound percentage?
Final = original x (1 + r1) x (1 + r2) x ... where each r is a percentage as decimal. A 10% raise then 10% cut: 1.10 x 0.90 = 0.99 = 99% of original.
How do I reverse a percentage?
If $80 is 80% of original: original = $80 / 0.80 = $100. To reverse 'X% off' to find original: original = final / (1 - X/100).
How do percentages work in tax?
Marginal tax rate applies to income within a bracket. Effective rate is total tax / total income. They diverge because of progressive brackets.
When does a function have an inverse?
When it's one-to-one, meaning no two inputs give the same output. Otherwise reversing would require choosing arbitrarily between the inputs. Squaring fails because 3 and minus 3 both give 9, which is why the square root convention returns only the positive value.
Why does the calculator refuse when the slope is zero?
Because a zero slope makes the function constant, so every input gives the same output and there's no way to recover which input was used. It's the clearest possible failure of the one-to-one condition.
Why doesn't arcsine of sine always return the original angle?
Because sine is periodic and massively non-injective, so arcsine returns only a principal value between minus 90 and 90 degrees. Feeding in an angle outside that range gives back a different angle with the same sine.
How do I check an inverse is correct?
Compose it with the original function in both orders, which should return the input in each case. It's a quick verification that catches algebraic slips, and it's the defining property of an inverse rather than an incidental one.
What does an inverse look like graphically?
The reflection of the original across the line y equals x, since swapping input and output swaps the axes. That's why a function failing the horizontal line test can't have an inverse: its reflection would fail the vertical line test.
What is an ill-posed inverse problem?
One where small measurement errors produce large errors in the inferred answer, violating Hadamard's continuity condition. Medical image reconstruction and deconvolution are examples, and they require regularisation rather than direct inversion to give usable results.
Are integration and differentiation inverses?
In the sense of the fundamental theorem of calculus, with the qualification that indefinite integration recovers a function only up to an additive constant. That constant is precisely the information differentiation discards, which is why it must be reintroduced.
Related calculators
Degrees Radians · Ellipse · Compound Shape Area · Polar to Cartesian · Scientific Notation