ƒ

Domain and Range Calculator

Interval Notation · Set Notation · Inequality Notation · Graph

Instantly find the domain and range of any function type — polynomial, rational, radical, logarithmic, trigonometric, exponential, and more — with step-by-step reasoning and a live graph.

Quick Examples

Function Preview
f(x) = ...

Domain & Range Reference Table

Function Type General Form Domain Range
Polynomialaxⁿ + bxⁿ⁻¹ + …(-∞, ∞)(-∞, ∞) for odd degree; varies for even
Rationalp(x) / q(x)ℝ \ {zeros of q}Depends on function
Square Root√(ax + b)ax+b ≥ 0 → x ≥ −b/a[0, ∞)
Cube Root∛(ax + b)(-∞, ∞)(-∞, ∞)
Logarithmiclog(ax + b)ax+b > 0 → x > −b/a(-∞, ∞)
Absolute Value|ax + b| + c(-∞, ∞)[c, ∞)
Quadraticax² + bx + c(-∞, ∞)[vertex_y, ∞) if a>0; (-∞, vertex_y] if a<0
sin / cossin(x), cos(x)(-∞, ∞)[-1, 1]
tantan(x)x ≠ π/2 + nπ(-∞, ∞)
Exponentiala·bˣ + c(-∞, ∞)(c, ∞) if a>0
Piecewisef₁(x) if x<k; f₂(x) if x≥kUnion of each piece's domainUnion of each piece's range

What Is the Domain of a Function?

The domain of a function is the complete set of all real-number input values (x-values) for which the function produces a valid, real output. When you graph a function, the domain corresponds to all the x-coordinates where the curve exists. Identifying the domain is one of the first steps in analyzing any mathematical function because it establishes the boundaries within which the function is meaningful.

The three primary rules that restrict the domain of a function are:

  • Division by zero: The denominator of a rational expression can never equal zero, so any x that makes the denominator zero is excluded.
  • Even roots of negatives: You cannot take the square root (or any even root) of a negative number in the real number system, so the radicand must be non-negative.
  • Logarithm of non-positives: The argument of a logarithm must be strictly positive (greater than zero).

What Is the Range of a Function?

The range of a function is the complete set of all possible output values (y-values) that the function can produce for inputs within its domain. On a graph, the range corresponds to all y-coordinates the curve reaches. Determining the range often requires more analysis than the domain — you need to understand how the function behaves across its entire domain, including at extremes and near any asymptotes.

Interval Notation Explained

Interval notation is the standard, compact way to express sets of real numbers used in domain and range answers:

  • (a, b) — open interval: all x with a < x < b (endpoints not included)
  • [a, b] — closed interval: all x with a ≤ x ≤ b (endpoints included)
  • [a, b) — half-open: a ≤ x < b
  • (a, ∞) — all x greater than a (∞ always gets a parenthesis)
  • (-∞, ∞) — all real numbers
  • A ∪ B — union: all values in A or B (used when domain has a gap)

Common Function Domains Quick Reference

Function Domain (Interval) Range (Interval) Key Restriction
1/(x − 3)(-∞,3)∪(3,∞)(-∞,0)∪(0,∞)denominator ≠ 0
√(2x − 4)[2, ∞)[0, ∞)radicand ≥ 0
log(x + 5)(-5, ∞)(-∞, ∞)argument > 0
x² − 4(-∞, ∞)[-4, ∞)none
|x + 2| − 1(-∞, ∞)[-1, ∞)none
tan(x)x ≠ π/2 + nπ(-∞, ∞)cos(x) ≠ 0
2ˣ + 1(-∞, ∞)(1, ∞)horizontal asymptote y=1

Why Domain Analysis Matters

Understanding the domain prevents you from substituting values that produce undefined or imaginary outputs. In calculus, the domain determines where a function's derivative exists. In engineering and science, domain restrictions often correspond to real-world constraints — a square root might model the radius of a circle (requiring a non-negative area), or a rational function might represent resistance in a circuit (which cannot be zero).

Rational Functions and Asymptotes

When a rational function f(x) = p(x)/q(x) has a zero of q(x) that is NOT also a zero of p(x), the graph has a vertical asymptote at that x-value. If both p and q share a common factor, the function has a hole (removable discontinuity) instead of an asymptote. This calculator identifies zeros of the denominator and marks them on the graph with dashed lines or open circles accordingly.

Piecewise Functions

A piecewise function is defined by different formulas on different parts of the domain. The overall domain is the union of all the sub-domains, and the range is the union of all the sub-ranges. For example, f(x) = x if x < 0; x² if x ≥ 0 has domain (-∞, ∞) and range [0, ∞) since x² ≥ 0 for x ≥ 0 and x < 0 for the first piece.

Real-World Applications of Domain and Range

  • Physics: Projectile height h(t) = −16t² + v₀t + h₀ has domain t ≥ 0 (time cannot be negative) and range [0, h_max].
  • Economics: Demand functions are only valid for positive quantities and prices, restricting their domain and range to the positive reals.
  • Computer Graphics: Inverse trigonometric functions are restricted to specific ranges to ensure unique outputs, enabling consistent rotation calculations.
  • Signal Processing: Logarithmic functions model decibel levels; the domain restriction (argument > 0) ensures only positive signal amplitudes are valid inputs.
  • Statistics: Probability density functions have domain over the real line but are restricted in range to non-negative values, and the range of the CDF is [0, 1].

Frequently Asked Questions

What is the domain of a function?
The domain of a function is the complete set of all possible x-values (inputs) for which the function is defined and produces a real output. Common restrictions include: division by zero (excluded), even roots of negative numbers (not real), and logarithms of non-positive numbers (undefined). For example, f(x) = 1/(x−3) has domain (-∞, 3) ∪ (3, ∞).
What is the range of a function?
The range of a function is the complete set of all possible output values (y-values) that result from substituting every valid input from the domain. For f(x) = x², the range is [0, ∞) since squaring any real number always gives a non-negative result. The range can be harder to determine than the domain — often requiring analysis of the function's behavior, vertex, asymptotes, or limits.
What is interval notation?
Interval notation is a compact way to describe continuous sets of real numbers. Square brackets [ ] mean the endpoint is included (closed), while parentheses ( ) mean the endpoint is excluded (open). Infinity is always written with a parenthesis since it is not a real number. For example: [2, ∞) means x ≥ 2; (-3, 5) means -3 < x < 5; (-∞, ∞) means all real numbers. A union symbol ∪ joins disjoint intervals, like (-∞, 0) ∪ (0, ∞) for all reals except zero.
How do you find the domain of a rational function?
For f(x) = p(x)/q(x), set q(x) = 0 and solve for x. These values are excluded from the domain since they cause division by zero. Write the domain as all reals except these values using interval notation with union. For example, f(x) = 1/(x−3): set x−3 = 0 → x = 3. Domain: (-∞, 3) ∪ (3, ∞). For f(x) = (x+1)/((x−1)(x+2)): exclude x = 1 and x = −2, so domain is (-∞, −2) ∪ (−2, 1) ∪ (1, ∞).
What is the domain of a square root function?
For f(x) = √(ax + b), the expression under the radical (the radicand) must be greater than or equal to zero. Set ax + b ≥ 0 and solve for x. If a > 0: x ≥ −b/a, so domain is [−b/a, ∞). If a < 0: x ≤ −b/a, so domain is (−∞, −b/a]. The range is always [0, ∞) since square roots are non-negative. Example: √(2x − 4) → 2x − 4 ≥ 0 → x ≥ 2 → domain [2, ∞).
How do you find the domain of a logarithmic function?
For f(x) = log(ax + b) or ln(ax + b), the argument must be strictly positive: ax + b > 0. Solve the strict inequality for x. If a > 0: x > −b/a, so domain is (−b/a, ∞). If a < 0: x < −b/a, so domain is (−∞, −b/a). The range of any logarithm is all real numbers (−∞, ∞) since the log can produce arbitrarily large or small values. Example: log(x + 5) → x + 5 > 0 → x > −5 → domain (−5, ∞).
What are the domains and ranges of trigonometric functions?
sin(x) and cos(x): domain (-∞, ∞), range [-1, 1]. tan(x) = sin(x)/cos(x): domain all reals except π/2 + nπ (where cos = 0), range (-∞, ∞). csc(x) = 1/sin(x): domain all reals except nπ, range (-∞, −1] ∪ [1, ∞). sec(x) = 1/cos(x): domain all reals except π/2 + nπ, range (-∞, −1] ∪ [1, ∞). cot(x) = cos(x)/sin(x): domain all reals except nπ, range (-∞, ∞).