Domain and range calculator
Find the domain and range of any function. Shows restrictions and step-by-step reasoning.
What is domain?
The domain of a function is the set of all valid input values (x-values) for which the function is defined. A function is undefined when you divide by zero, take the square root of a negative number, or take the logarithm of zero or a negative number.
What is range?
The range is the set of all possible output values (y-values) that the function can produce.
Common domain restrictions
Polynomials (x², x³+2x, etc.): Domain is all real numbers (−∞, ∞). No restrictions.
Rational functions (1/(x−2), x/(x²−4)): Exclude values where the denominator = 0.
Square root / radical (√(x−3)): The expression under the root must be ≥ 0.
Logarithmic (ln(x), log(x+1)): The argument must be > 0.
Combined: For √(x−1)/(x−4), you need x−1 ≥ 0 AND x ≠ 4, so x ∈ [1, 4) ∪ (4, ∞).
How to find the range
1. Set y = f(x) and solve for x in terms of y.
2. Find which y-values give valid x-values.
3. Alternatively, analyze the function's behavior: minimum/maximum values, asymptotes, end behavior.
Frequently asked questions
What is interval notation?
Parentheses ( ) mean the endpoint is excluded. Brackets [ ] mean it's included. (−∞, 2) ∪ (2, ∞) means all reals except 2. [0, ∞) means 0 and all positive numbers.
Can a function have the same domain and range?
Yes — for example, f(x) = x has both domain and range as (−∞, ∞). f(x) = 1/x has domain (−∞, 0) ∪ (0, ∞) and range (−∞, 0) ∪ (0, ∞).