Type a function of x to find every x it accepts (domain) and every y it produces (range). The calculator shows why points are excluded, the asymptotes and holes, and graphs the function with both sets marked on the axes.
Last updated:
Examples:
Use x as the variable: + − * / ^, sqrt, cbrt, abs or |x|, ln, log, exp, e^x, sin, cos, tan, asin, acos, atan, pi. Implicit multiplication like 3x works.
Domain
Range
f(x)Domain on the x-axisRange on the y-axisAsymptote
How the domain is found
How the range is found
Key features
Advertisement
Advertisement
How to use the Domain and Range Calculator
Type the function f(x), for example sqrt(x - 2), (2x + 1)/(x - 3) or ln(x^2 - 4), or tap an example.
Press Find domain & range (or Enter).
Read the answers in interval notation and set-builder notation at the top.
Check the reasoning: the domain steps list each restriction and the range steps list the limits, turning points and endpoints used.
Explore the graph: drag to pan, scroll or use + and − to zoom. The green band on the x-axis is the domain, the orange band on the y-axis is the range.
Domain restrictions to look for
Part of f(x)
Requirement
Example
Domain
Polynomial
None
x³ − 2x + 1
(−∞, ∞)
Fraction P/Q
Q ≠ 0
1/(x² − 4)
(−∞, −2) ∪ (−2, 2) ∪ (2, ∞)
Square root √u (any even root)
u ≥ 0
√(9 − x²)
[−3, 3]
Root in a denominator 1/√u
u > 0
1/√(x + 1)
(−1, ∞)
Cube root ∛u (any odd root)
None
∛(x − 5)
(−∞, ∞)
Logarithm ln u, log u
u > 0
ln(x² − 4)
(−∞, −2) ∪ (2, ∞)
arcsin u, arccos u
−1 ≤ u ≤ 1
arcsin(x/2)
[−2, 2]
tan u, sec u
cos u ≠ 0
tan(x)
x ≠ π/2 + kπ
cot u, csc u
sin u ≠ 0
cot(x)
x ≠ kπ
Domain and range of common parent functions
Function
Domain
Range
f(x) = x² (and any even power)
(−∞, ∞)
[0, ∞)
f(x) = x³ (and any odd power)
(−∞, ∞)
(−∞, ∞)
f(x) = √x
[0, ∞)
[0, ∞)
f(x) = 1/x
x ≠ 0
y ≠ 0
f(x) = |x|
(−∞, ∞)
[0, ∞)
f(x) = eˣ, 2ˣ
(−∞, ∞)
(0, ∞)
f(x) = ln x
(0, ∞)
(−∞, ∞)
f(x) = sin x, cos x
(−∞, ∞)
[−1, 1]
f(x) = tan x
x ≠ π/2 + kπ
(−∞, ∞)
f(x) = arcsin x
[−1, 1]
[−π/2, π/2]
f(x) = arctan x
(−∞, ∞)
(−π/2, π/2)
Transformations move these sets in predictable ways: a(f(x − h)) + k shifts the domain by h and the range by k, and a negative a flips the range upside down. For f(x) = −2(x − 1)² + 3 the domain stays (−∞, ∞) and the range becomes (−∞, 3].
Worked example: a rational function
For f(x) = (2x + 1)/(x − 3), the denominator is zero at x = 3, so the domain is (−∞, 3) ∪ (3, ∞). Near x = 3 the function shoots to −∞ on the left and +∞ on the right (a vertical asymptote). As x → ±∞, f(x) → 2/1 = 2, the ratio of leading coefficients, and solving (2x + 1)/(x − 3) = 2 gives 1 = −6, which is impossible, so the graph never touches y = 2. The range is therefore (−∞, 2) ∪ (2, ∞). A quick check of any rational answer: the excluded range value is the y-value of the inverse function's vertical asymptote.
Frequently asked questions
What is the domain and range of a function?
The domain is the set of all input values x for which f(x) is defined as a real number. The range is the set of all output values f(x) actually produces. For f(x) = √(x − 2), the domain is [2, ∞) because the radicand cannot be negative, and the range is [0, ∞) because a square root is never negative.
How do you find the domain of a function?
Start with all real numbers and remove the x values that break the formula: zeros of any denominator, values that make an even root (like a square root) negative, values that make a logarithm's argument zero or negative, and values outside [−1, 1] inside arcsin or arccos. What is left is the domain.
How do you find the range of a function?
Look at the values f(x) can reach on each continuous piece of the domain: its limits at the ends (including x → ±∞ and near vertical asymptotes), its turning points (where the derivative is zero) and its value at any closed endpoint. The union of those intervals is the range. Horizontal asymptotes often mark a value the function approaches but never reaches.
What is the domain and range of a rational function?
The domain is all real numbers except the zeros of the denominator. For f(x) = (2x + 1)/(x − 3) that is (−∞, 3) ∪ (3, ∞). The range excludes the horizontal asymptote value when the function never crosses it: here y = 2, so the range is (−∞, 2) ∪ (2, ∞).
What is a hole in a graph?
A hole is a single missing point where a factor cancels. f(x) = (x² − 1)/(x − 1) equals x + 1 everywhere except x = 1, where it is undefined. The graph is the line y = x + 1 with an open circle at (1, 2), so 1 is missing from the domain and 2 is missing from the range.
Why do tan(x) and similar functions show k in the answer?
tan(x) = sin(x)/cos(x) is undefined wherever cos(x) = 0, which happens at x = π/2 + kπ for every integer k. Because there are infinitely many such points, the domain is written as all real numbers except x = π/2 + kπ, k ∈ ℤ.
Are the results exact?
Domains of polynomial, rational, root and logarithmic expressions are found exactly, including endpoints like √2 or (1 + √5)/2. Ranges are found numerically from limits and turning points and then matched to exact values such as fractions, square roots and multiples of π. A value that cannot be matched is shown as a decimal marked with ≈.
Are all the tools on FreeToolCabin tested for quality and accuracy?
Yes! Every tool on our site undergoes automated Q/A testing in real browser environments to ensure high precision, correct output, and zero errors. If you happen to spot a bug or have a suggestion, please contact us at [email protected] and our team will review it right away.