Skip to content
ihateDesmos

Domain and range calculator

Type a function to find its domain and range, in interval notation and in words. The steps show which values of x have to be left out and why, and the graph lets you see both answers.

Domain
(−∞, −2) ∪ (−2, 2) ∪ (2, ∞)
Range
(−∞, −1/4] ∪ (0, ∞)
Domain, in words
x ≠ −2, 2
Range, in words
(−∞, −1/4] ∪ (0, ∞)
Your function
f(x) = 1/(x² − 4)
Steps
  1. A denominator can’t be zero: x² − 4 ≠ 0, which gives x ≠ −2, 2
  2. For the range, follow the function across its domain. Check its limits at each end of each interval, and its highest and lowest turning points.
  3. Those values give the range: (−∞, −1/4] ∪ (0, ∞)
−6−5−4−3−2−1123456−1−0.8−0.6−0.4−0.20.20.40.60.8
The graph of f(x) = 1/(x² − 4).

The range is found numerically from limits and turning points, then matched to exact values. Check it against the graph.

Open in the graphing calculator →

How to find the domain and range here

  1. 1
    Type your function of x, such as 1/(x - 2), sqrt(x + 3) or ln(x).
  2. 2
    Read the domain and range, in interval notation and in words.
  3. 3
    Check them on the graph. The domain is how far the curve spreads left and right, and the range is how far it spreads up and down.

How to find the domain

Start with all real numbers, then remove any value of x that breaks a rule:

If the function hasThen you needExample
A fractionThe denominator isn’t 01/(x − 2): x ≠ 2
A square rootThe inside is at least 0√(x + 3): x ≥ −3
A logarithmThe inside is above 0ln(x − 1): x > 1
arcsin or arccosThe inside is from −1 to 1arcsin(x): −1 ≤ x ≤ 1
tan or secThe cosine isn’t 0tan(x): x ≠ π/2 + nπ
Anything elseNo restrictionx³ + 1, eˣ, sin(x), |x|

If a function has several of these, all the conditions must hold at once. For √x/(x − 4), you need x ≥ 0 and x ≠ 4.

How to find the range

The range is harder, since no single rule covers it. Ask what values the function really reaches, working across its domain:

  1. Find its highest and lowest turning points.
  2. Check what happens at each end: as x goes to ±∞, and as x approaches any value left out of the domain.
  3. Decide whether each boundary is reached. The value 0 isn’t in the range of eˣ, for example, because eˣ only gets closer to it.

For a parabola, this is simple, because the range starts at the vertex. For a rational function, horizontal asymptotes often mark the missing values. Our guide to domain and range works through each type.

Reading interval notation

NotationMeans
(2, 5)2 < x < 5, with neither end included
[2, 5]2 ≤ x ≤ 5, with both ends included
[2, ∞)x ≥ 2
(−∞, 2) ∪ (2, ∞)Every number except 2
(−∞, ∞)All real numbers

Examples

FunctionDomainRange
x²(−∞, ∞)[0, ∞)
1/x(−∞, 0) ∪ (0, ∞)(−∞, 0) ∪ (0, ∞)
√(x − 2)[2, ∞)[0, ∞)
√(4 − x²)[−2, 2][0, 2]
eˣ(−∞, ∞)(0, ∞)
ln(x)(0, ∞)(−∞, ∞)
sin(x)(−∞, ∞)[−1, 1]
arctan(x)(−∞, ∞)(−π/2, π/2)
1/(x² + 1)(−∞, ∞)(0, 1]

How the answers are found

The domain is worked out from the formula, and it’s exact when the conditions are fractions of polynomials. The range is found by following the function numerically through its turning points and limits, then matching the results to exact values such as 1/4, √2 or π/2. Anything that doesn’t match is shown as a decimal marked ≈. This works well for the functions in most courses, but it isn’t a proof, so compare it with the graph. If a domain repeats forever in a complicated pattern, as with √(sin x), the calculator says so rather than giving part of the answer.

Frequently asked questions

What is the difference between domain and range?
The domain is every x you’re allowed to put in. The range is every y you can get out. On a graph, the domain is the curve’s horizontal spread and the range is its vertical spread.
How do I find the domain of a fraction?
Set the denominator equal to zero and solve. Those values are excluded. For 1/(x² − 4), the denominator is zero at x = ±2, so the domain is every number except 2 and −2.
What is the domain of a square root?
Whatever makes the inside non-negative. For √(x + 3), solve x + 3 ≥ 0 to get x ≥ −3.
What are the domain and range of a parabola?
The domain is all real numbers. The range goes from the vertex up if it opens upward, or from the vertex down if it opens downward.
Why does (x² − 1)/(x − 1) leave out x = 1?
At x = 1 the denominator is zero, so the function is undefined there, even though it simplifies to x + 1 everywhere else. The graph is a straight line with a hole, which also leaves y = 2 out of the range.
Is it free?
Yes, with no sign-up. It runs in your browser.

Related tools and guides

See it on a graph

Graph any function in the calculator to see its domain and range, with holes and asymptotes drawn correctly.

Open the calculator