Domain and Range Calculator
A function’s domain tells you which x‑values you can plug into an expression without breaking it. The range shows the possible y‑outputs you get back. Enter your function below to see both instantly, complete with a graph and step‑by‑step reasoning.
What Is Domain and Range?
Every function has an input‑output relationship. The domain is the set of all real numbers that work as inputs. The range is the collection of all outputs the function actually produces. If you think of a function as a machine, the domain is what you can safely feed it, and the range is what comes out.
For example:
f(x) = x² − 4 Domain: all real numbers (you can square anything). Range: y ≥ −4 because the smallest value the square gives is 0, then subtract 4.
g(x) = 1 / (x − 2) Domain: x ≠ 2 (division by zero is undefined). Range: y ≠ 0 (a fraction can never equal zero).
h(x) = √(x + 1) Domain: x ≥ −1 (inside the square root must be non‑negative). Range: y ≥ 0 (square roots always give non‑negative results).
How to Find Domain Algebraically
The calculator above applies the same logic you would use by hand. It checks three restrictions:
- Denominators cannot be zero – solve denominator = 0 and exclude those x’s.
- Even‑indexed roots must have a non‑negative radicand – set the inside ≥ 0.
- Logarithms (and ln) require a positive argument – set the inside > 0.
For more complex functions, the tool also considers inverse operations, piecewise definitions, and trigonometric constraints. The final domain is the intersection of all allowed intervals.
Understanding Range Through Graphs
While domain often follows straightforward algebraic rules, range usually needs a look at the function’s shape. The calculator plots the graph and reads the vertical extent automatically. Manually, you would:
- Find the minimum and maximum y-values from the graph.
- Check for horizontal asymptotes (lines the function approaches but never touches).
- Identify any gaps or jumps.
For instance, the range of f(x) = eˣ is (0, ∞) because exponential growth never hits zero.
When to Use This Calculator
The tool saves time when you face functions with multiple parts, logarithms, trigonometric expressions, or nested radicals. Instead of solving inequalities by hand, you get an instant result and a visual confirmation.
It’s particularly helpful if you’re:
- Checking homework or exam answers.
- Preparing a graph without using a full CAS system.
- Learning how domain restrictions affect a function’s behavior.
- Working with functions that mix polynomial, rational, and transcendental elements.
Tips for Reading the Output
The calculator shows domain and range in interval notation and set‑builder notation. A closed bracket [ means the endpoint is included, a parenthesis ( means it’s not. Infinity is always open. For example, (−2, 5] means x > −2 but x ≤ 5. The graph highlights the valid input and output regions in different colors.
Remember that the tool interprets functions in standard mathematical form. Use ** for exponents, sqrt() for square roots, and log() for base‑10 logs. Trigonometric functions like sin(x) and cos(x) are recognized with radian arguments unless you specify deg.
Disclaimer: This calculator provides general mathematical results. For critical applications, verify manually or consult a qualified mathematician.