About the Domain and Range Calculator
This domain and range calculator gives the exact domain (all allowed x-values) and range (all possible y-values) of the function families you meet in algebra and precalculus: linear, quadratic and cubic polynomials, rational functions (ax + b)/(cx + d), square roots, cube roots, absolute values, exponentials, natural logarithms and sine, cosine and tangent. Pick the family, enter its parameters and read the answer in both interval notation and set-builder notation.
Each answer comes from the rule that limits that family — you cannot divide by zero, take the square root of a negative number or the logarithm of a non-positive one — combined with the transformation from the parameters: a vertical stretch or reflection, a horizontal shift and a vertical shift. The calculator also reports asymptotes and the vertex or starting point where they matter, and lists sample values so you can see the behaviour.
It is for students checking homework and teachers building examples. Working family by family means the answer is exact rather than estimated from a graph. All functions are real-valued, and trigonometric functions use radians.
How to use the domain and range calculator
- 1Choose the type of function that matches yours.
- 2Enter the parameters a, b, c and d as shown in the formula.
- 3Check the "Function" output to confirm it matches your function.
- 4Read the domain and range in interval and set-builder notation.
- 5Use the key features and sample values to sketch the graph.
Formula and method
The domain of a real function is every x for which the formula produces a real number. Polynomials, cube roots, absolute values, exponentials, sine and cosine accept every real x. Rational functions exclude zeros of the denominator, even roots need a non-negative inside (b·x + c ≥ 0) and logarithms need a strictly positive inside (b·x + c > 0); tangent excludes the points where cos(b·x + c) = 0.
The range follows from the parent function and the transformation y = a·parent + d. A positive a keeps the direction and a negative a flips it; d shifts everything up or down. For example √ has range [0, ∞), so a·√(…) + d has range [d, ∞) when a > 0 and (−∞, d] when a < 0. Quadratics start at the vertex value c − b²/(4a), exponentials approach the asymptote y = c without reaching it, and (ax + b)/(cx + d) never reaches its horizontal asymptote a/c.
- a
- Vertical stretch; a negative value reflects the graph
- b, c
- Inside coefficients (horizontal scale and shift)
- d
- Vertical shift
- [ ] / ( )
- Closed (included) / open (excluded) endpoint
Worked examples
Square root: f(x) = 2√(x − 3) + 1
The inside x − 3 must be at least 0, so x ≥ 3. The square root is at least 0, doubling keeps it at least 0, and adding 1 gives y ≥ 1.
Rational: f(x) = (2x + 1)/(x − 4)
The denominator is zero at x = 4, so 4 is excluded from the domain. The horizontal asymptote is y = 2/1 = 2, which the function never equals, so 2 is excluded from the range.
Quadratic: f(x) = −x² + 4x + 1
Every x is allowed. The vertex is at x = −4/(2·−1) = 2, where f(2) = −4 + 8 + 1 = 5; the parabola opens downward, so the range is y ≤ 5.
Logarithm: f(x) = ln(2x + 6) − 1
The logarithm needs 2x + 6 > 0, so x > −3 (an open bracket, because ln 0 is undefined). A logarithm takes every real value, so the range is all real numbers.
Sine: f(x) = 3·sin(2x) − 1
Sine accepts every x. It oscillates between −1 and 1, so 3·sin(2x) lies between −3 and 3, and subtracting 1 gives a range of [−4, 2].
Frequently asked questions
What is the difference between domain and range?+
The domain is the set of all input values (x) for which the function is defined. The range is the set of all output values (y) the function actually produces as x moves through the domain.
How do you find the domain of a function?+
Start with all real numbers and remove the values that break a rule: x-values that make a denominator zero, make the inside of an even root negative, or make the inside of a logarithm zero or negative.
How do you find the range of a function?+
Find the range of the parent function, then apply the transformations: multiply by a (flipping it if a is negative) and shift by the vertical shift. For quadratics, the vertex y-value is the minimum or maximum.
When do you use brackets versus parentheses in interval notation?+
A square bracket [ ] means the endpoint is included, as in x ≥ 3. A parenthesis ( ) means it is excluded, as for x > −3 or for ∞, which is never a number and always gets a parenthesis.
What is the domain and range of 1/x?+
The domain is all real numbers except 0, (−∞, 0) ∪ (0, ∞), because division by zero is undefined. The range is also all real numbers except 0, because 1/x can never equal zero.