Domain and Range Calculator (Free, with Graph)
AlgebraFreeNo sign-up
A domain and range calculator finds the allowed inputs and possible outputs. For f(x) = (2x + 1)/(x − 3), the denominator cannot be 0, so the domain is all real numbers except 3: (−∞, 3) ∪ (3, ∞). Solving y = f(x) for x gives x = (3y + 1)/(y − 2), which fails only at y = 2, so the range is (−∞, 2) ∪ (2, ∞).
Range: (−∞, 2) ∪ (2, ∞)
For f(x) = (2x + 1)/(x − 3), the domain is all real numbers except x = 3 and the range is all real numbers except y = 2.
Show steps
- Domain: look for the parts of f(x) = (2x + 1)/(x − 3) that limit x: denominators (cannot be 0), even roots (need a value ≥ 0) and logarithms (need a value > 0).
- A denominator cannot be 0: x − 3 ≠ 0. Solve x − 3 = 0: x = 3. So x ≠ 3.
- So the domain is (−∞, 3) ∪ (3, ∞), or {x ∈ ℝ | x ≠ 3}.
- Range: set y = (2x + 1)/(x − 3) and multiply both sides by the denominator: y(x − 3) = 2x + 1. Collect powers of x: (−y + 2)x + (3y + 1) = 0.
- This is linear in x, so x = −(3y + 1)/(−y + 2). It fails only when −y + 2 = 0, that is y = 2. So y = 2 is never reached: it is the horizontal asymptote.
- So the range is (−∞, 2) ∪ (2, ∞), or {y ∈ ℝ | y ≠ 2}.
Numeric check: f was evaluated at 2,998 points across the domain. The values ran from about −1,310.4938 to about 1,314.4938, and every one lies inside the range shown. ✓
How to use the domain and range calculator
- Type a function of x, such as sqrt(x – 3) + 2, (x + 1)/(x^2 – 4) or ln(x – 1). You can also choose Function family and enter a, h and k for linear, quadratic, absolute value, square root, cube root, rational, exponential and logarithmic functions.
- Read the domain and range in interval notation and in set-builder notation. Rational functions also show vertical and horizontal (or slant) asymptotes and any holes.
- Check the graph: the green band on the x-axis is the domain and the gold band on the y-axis is the range.
- Open Show steps to see each restriction solved and how the range was found, followed by a numeric check.
How to find the domain of a function
The domain is the set of inputs x for which f(x) is a real number. Start with all real numbers and remove the values that break one of three rules:
- Denominators cannot be 0. For 1/(x − 2), x ≠ 2.
- Even roots need a value of at least 0. For √(x − 3), x − 3 ≥ 0, so x ≥ 3.
- Logarithms need a positive input. For ln(x − 1), x − 1 > 0, so x > 1.
When a condition is a polynomial or a fraction of polynomials, find where it is 0 or undefined, mark those x-values on a number line, and test one x in each interval. If a function has several restrictions, the domain is where all of them hold at once. Polynomials, cube roots, |x|, e^x, sin x and cos x have no restrictions of their own.
How to find the range of a function
The range is harder because you must know which outputs actually occur. These methods cover most school functions:
- Quadratics: find the vertex. f(x) = x² − 4x + 1 has its vertex at x = −b/(2a) = 2, where f(2) = −3. The parabola opens up, so the range is [−3, ∞).
- Rational functions: set y = f(x), solve for x, and see which y-values have no solution. For (2x + 1)/(x − 3) that value is y = 2, the horizontal asymptote. When x² appears, use the discriminant: a real x exists only when b² − 4ac ≥ 0.
- Transformed functions: work from the inside out. For √(4 − x²), the inside 4 − x² takes values up to 4; the square root only accepts 0 to 4, so it returns 0 to 2. The range is [0, 2].
- Exponentials and logarithms: b^x is always positive, so 2^x − 3 has range (−3, ∞). A logarithm such as ln(x − 1) takes every real value.
Domain and range of common functions
| Function | Domain | Range |
|---|---|---|
| f(x) = mx + b, m ≠ 0 | (−∞, ∞) | (−∞, ∞) |
| f(x) = a(x − h)² + k, a > 0 | (−∞, ∞) | [k, ∞) |
| f(x) = a|x − h| + k, a > 0 | (−∞, ∞) | [k, ∞) |
| f(x) = a√(x − h) + k, a > 0 | [h, ∞) | [k, ∞) |
| f(x) = a∛(x − h) + k | (−∞, ∞) | (−∞, ∞) |
| f(x) = a/(x − h) + k | x ≠ h | y ≠ k |
| f(x) = a·b^(x − h) + k, a > 0 | (−∞, ∞) | (k, ∞) |
| f(x) = a·log_b(x − h) + k | (h, ∞) | (−∞, ∞) |
| f(x) = sin x or cos x | (−∞, ∞) | [−1, 1] |
If a is negative, the graph flips: the square root, absolute value and quadratic ranges become (−∞, k], and the exponential range becomes (−∞, k).
Worked examples
Example 1: a rational function with two excluded values
For f(x) = (x + 1)/(x² − 4), the denominator is 0 when x = −2 or x = 2. The domain is (−∞, −2) ∪ (−2, 2) ∪ (2, ∞), or {x ∈ ℝ | x ≠ −2, x ≠ 2}. Solving y(x² − 4) = x + 1 gives yx² − x − (4y + 1) = 0, whose discriminant 1 + 4y(4y + 1) = 16y² + 4y + 1 is always positive. Every y is reached, so the range is (−∞, ∞).
Example 2: a square root of a quadratic
For f(x) = √(4 − x²), we need 4 − x² ≥ 0. The zeros are x = −2 and x = 2, and testing x = 0 gives 4 > 0, so the domain is [−2, 2]. On that interval 4 − x² runs from 0 to 4, so the square root runs from 0 to 2: the range is [0, 2]. The graph is the top half of a circle with radius 2.
Example 3: a hole changes the range
f(x) = (x² − 1)/(x − 1) equals x + 1 after cancelling, but x = 1 is still excluded. The domain is all real numbers except 1. The line y = x + 1 would reach y = 2 only at x = 1, so 2 is missing: the range is (−∞, 2) ∪ (2, ∞). The graph has a hole at (1, 2).
Interval notation and set-builder notation
Interval notation lists the pieces of the set. A square bracket [ ] includes the endpoint and a parenthesis ( ) excludes it. Infinity always gets a parenthesis, and ∪ joins separate pieces. Set-builder notation describes the rule instead: {x ∈ ℝ | x ≥ 3} reads “all real x such that x is at least 3”. Both describe the same set, so use whichever your teacher asks for.
| Words | Interval notation | Set-builder notation |
|---|---|---|
| x is at least 3 | [3, ∞) | {x ∈ ℝ | x ≥ 3} |
| x is any number except 2 | (−∞, 2) ∪ (2, ∞) | {x ∈ ℝ | x ≠ 2} |
| x is from −2 to 2, inclusive | [−2, 2] | {x ∈ ℝ | −2 ≤ x ≤ 2} |
| x is less than −3 or greater than 3 | (−∞, −3) ∪ (3, ∞) | {x ∈ ℝ | x < −3 or x > 3} |
Common mistakes with domain and range
- Cancelling first. Simplify (x² − 1)/(x − 1) to x + 1 only after you record x ≠ 1. The excluded value stays excluded.
- Using a bracket next to ∞. Infinity is not a number you can reach, so write [3, ∞), never [3, ∞].
- Using > 0 for a square root. √0 = 0 is allowed, so the inside must be ≥ 0. For a logarithm, the inside must be strictly > 0.
- Assuming the range is all real numbers. Check for a vertex, a horizontal asymptote, or an outer function such as √ or b^x that limits the outputs.
- Mixing up the two. The domain lives on the x-axis (inputs) and the range on the y-axis (outputs).
Domain and Range practice quiz: 10 questions
Test yourself with 10 multiple-choice questions. Choose an answer and press Submit to see if you are right and why. Your score appears at the end.
The denominator x − 7 is 0 when x = 7, so 7 is excluded. Every other x works.
The inside must be at least 0: x + 4 ≥ 0, so x ≥ −4. The endpoint is included because √0 = 0.
The vertex is (3, 2) and the parabola opens up, so the smallest output is 2 and it is reached at x = 3.
A logarithm needs a positive input: 5 − x > 0 gives x < 5. The value 5 itself is excluded because ln 0 is undefined.
3/(x + 1) can be any number except 0, so subtracting 4 gives every number except −4, the horizontal asymptote. −1 is the excluded x-value.
2^x is always positive but gets as close to 0 as you like, so 2^x + 1 is always greater than 1 and never equals 1.
x² − 9 = (x − 3)(x + 3) is 0 at x = 3 and x = −3. The numerator does not matter for the domain.
|x| is at least 0, so −|x| is at most 0 and −|x| + 5 is at most 5. The value 5 is reached at x = 0.
x is strictly greater than −1, so −1 gets a parenthesis. Infinity always gets a parenthesis too.
The root needs 6 − 2x ≥ 0 and the denominator needs it to be nonzero, so 6 − 2x > 0, which gives x < 3.
Quiz complete
Frequently asked questions
What is interval notation?
Interval notation writes a set of numbers as intervals between endpoints. Brackets include an endpoint, parentheses exclude it, and ∪ joins pieces. For example, [3, ∞) means every number from 3 upward, and (−∞, 2) ∪ (2, ∞) means every number except 2.
Which function types are supported?
Polynomials, rational functions, square and cube roots, fractional powers, absolute value, exponentials, natural, common and base-b logarithms, sin and cos, and combinations of them. Polynomial and rational conditions are solved exactly. Other combinations are solved numerically and the result is marked with ≈.
Does it graph the function?
Yes. The graph shows the curve with the domain shaded on the x-axis and the range shaded on the y-axis. Rational functions also show vertical asymptotes, horizontal or slant asymptotes and holes.
How do you find the domain and range from a graph?
Read the domain from left to right: the x-values the graph covers. Read the range from bottom to top: the y-values it covers. An open circle means that point is not included, and an arrow means the graph keeps going.
What is the domain of a function with a square root in the denominator?
The inside must be strictly positive, because it must be at least 0 for the root and cannot be 0 in a denominator. For 1/√(x + 5), x + 5 > 0, so the domain is (−5, ∞).
Related calculators
- Function grapher
- Inverse function calculator
- Function composition calculator
- Inequality calculator
- Parabola calculator
More algebra calculators
Related to This Article
More math articles
- Newton’s Technique to Fish Out the Roots
- Significant Figures Calculator
- Family and Religion
- 10 Most Common 6th Grade SBAC Math Questions
- WEST-B Math Flashcards
- Probability Calculator (Free)
- 2048 Math — Merge Tiles and Learn Powers of 2
- How to Memorize the Multiplication Table in 7 Days
- Maryland Algebra 1 Free Worksheets: 65 Free Printable Algebra 1 Worksheets with Worked Answers
- Free Grade 8 English Worksheets for Connecticut Students


What people say about "Domain and Range Calculator With Graph and Steps"?
No one replied yet.