Inverse function calculator
This inverse function calculator reverses a supported one-to-one algebraic function and reports the domain on which the inverse is valid.
Run — free
Enter an affine function, a shifted integer power, or a shifted reciprocal function. The calculator rewrites the rule with y, swaps x and y, solves for the new y, and identifies the original range that becomes the inverse domain. Even powers must include a branch restriction, because without one they are not one-to-one and therefore do not have an inverse function.
What an inverse function actually reverses
An inverse function reverses the input-output relationship of the original function. If f sends 4 to 11, then its inverse must send 11 back to 4. This is stronger than taking a reciprocal: f^(-1)(x) does not mean 1/f(x). The standard algebraic procedure begins by writing y=f(x), exchanging x and y, and solving the resulting equation for y. That exchange reflects the geometric fact that a function and its inverse are mirror images across the line y=x. This calculator carries out those operations for affine rules, shifted integer powers, and shifted reciprocal rules with numeric constants. The returned steps expose the transformation, while the normalized function and inverse make the result easy to copy. You can verify an answer by composing the two rules: f(f^(-1)(x)) and f^(-1)(f(x)) should simplify to x wherever the relevant domains permit both expressions. Domain conditions matter during that check; an algebraic-looking identity outside the allowed set does not establish a valid inverse function there.
Why even powers require a restricted branch
A function has an inverse function only when every output identifies exactly one input. Linear functions with nonzero slope pass this test on all real numbers, as do odd-power transformations and reciprocal transformations on their natural domains. An even power is different: points equally far to the left and right of its vertex produce the same output. For example, x squared sends both 3 and -3 to 9. The calculator therefore requires a domain such as x>=0 or x<=0 for an even power, shifted to the actual vertex when the expression is a*(x-h)^n+k. Choosing x>=h keeps the right-hand branch and produces the positive root; choosing x<=h keeps the left-hand branch and produces the negative root. Neither branch is universally preferable. The correct choice comes from the original problem, graph, or application. The restriction is part of the definition, not an optional annotation added after solving. If it is missing or its boundary does not match the vertex, the request is rejected instead of silently selecting a branch.
Reading the inverse domain and checking the result
The domain of an inverse equals the range of the original function. This calculator reports the original domain, original range, and inverse domain separately so that the relationship stays visible. For an unrestricted nonconstant linear function, all three sets are all real numbers. A reciprocal function excludes its vertical-asymptote value from the original domain and excludes its horizontal-asymptote value from the range; that excluded range value becomes the inverse's excluded input. For an even shifted power, the vertex value k is an endpoint of the range. Whether the range extends upward or downward depends on the sign of the leading coefficient a, so the inverse domain is x>=k when a is positive and x<=k when a is negative. After receiving a result, test a few allowed values in both directions and confirm that composition returns the starting value. Also check excluded endpoints and asymptotes explicitly. The solver deliberately accepts a focused grammar rather than pretending to understand arbitrary notation; use explicit numeric constants and one of the documented forms for predictable results.
What you can do with it
Check algebra homework
Compare your swap-and-solve work with a normalized inverse expression and the domain condition that makes it valid.
Reverse a calibration rule
Turn a one-to-one formula that maps a measurement to a reading into a rule that recovers the measurement.
Analyze a restricted parabola
Select the left or right branch of an even-power function and obtain the matching square-root inverse.
FAQ
What does the calculator cost?
It runs free in the browser. API requests cost $0.002 each.
Is an inverse function the same as a reciprocal?
No. An inverse reverses inputs and outputs, while a reciprocal is one divided by the function value.
Why must I restrict an even-power function?
Without a branch restriction, two different inputs can produce the same output, so the function is not one-to-one.
Which function forms are supported?
The solver supports ax+b, a*(x-h)^n+k for integer n from 2 through 9, and a/(x-h)+k, using numeric constants.
How is the inverse domain found?
It is the range of the original function, including endpoints for restricted even powers and exclusions created by reciprocal asymptotes.
For developers — API access
Everything on this page is available programmatically. This section is for teams who want to wire it into their own systems; everyone else can just use the tool above.
API endpoint
Prefer to automate it? One authenticated POST creates the task; the result comes back by webhook or a signed link. The same capability also runs here on the web, by email and from Telegram — and soon from our app too.
Call it from your stack
curl -X POST https://api.kit.forhosting.com/algebra/function-inverse \
-H "Authorization: Bearer $KIT_KEY" \
-H "Content-Type: application/json" \
-d '{"function":"f(x)=2*x+3"}'const res = await fetch("https://api.kit.forhosting.com/algebra/function-inverse", {
method: "POST",
headers: {
"Authorization": `Bearer ${process.env.KIT_KEY}`,
"Content-Type": "application/json"
},
body: JSON.stringify({
"function": "f(x)=2*x+3"
})
});
const { task_id } = await res.json();import os, requests
res = requests.post(
"https://api.kit.forhosting.com/algebra/function-inverse",
headers={"Authorization": f"Bearer {os.environ['KIT_KEY']}"},
json={
"function": "f(x)=2*x+3"
},
)
task_id = res.json()["task_id"]<?php
$res = file_get_contents("https://api.kit.forhosting.com/algebra/function-inverse", false, stream_context_create([
"http" => [
"method" => "POST",
"header" => "Authorization: Bearer " . getenv("KIT_KEY") . "\r\nContent-Type: application/json",
"content" => '{"function":"f(x)=2*x+3"}',
],
]));
$task = json_decode($res, true);body := bytes.NewBufferString(`{"function":"f(x)=2*x+3"}`)
req, _ := http.NewRequest("POST", "https://api.kit.forhosting.com/algebra/function-inverse", body)
req.Header.Set("Authorization", "Bearer "+os.Getenv("KIT_KEY"))
req.Header.Set("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)Example request
{
"function": "f(x)=2*x+3"
}Example response
{
"task_id": "tsk_a1b2c3d4e5f6a1b2c3d4e5f6",
"type": "algebra.function_inverse",
"status": "queued",
"_links": {
"result": "/tasks/tsk_…/result"
}
}The API is asynchronous: the call returns a task_id immediately and the result arrives by webhook. Polling is capped at 1 req/s per task.
Pricing
Published price — no tokens, no invented credits. A failed task is never charged.
Errors
| HTTP | Code | Meaning |
|---|---|---|
401 | unauthorized | Missing or invalid API key. |
402 | insufficient_balance | Your balance doesn't cover the task price. |
404 | unknown_type | That task type doesn't exist. |
429 | rate_limited | Too many requests. Use the webhook instead of polling. |