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
Domain in All Three Notations
Step-by-Step Reasoning
Function Graph
Domain & Range Reference Table
| Function Type | General Form | Domain | Range |
|---|---|---|---|
| Polynomial | axⁿ + bxⁿ⁻¹ + … | (-∞, ∞) | (-∞, ∞) for odd degree; varies for even |
| Rational | p(x) / q(x) | ℝ \ {zeros of q} | Depends on function |
| Square Root | √(ax + b) | ax+b ≥ 0 → x ≥ −b/a | [0, ∞) |
| Cube Root | ∛(ax + b) | (-∞, ∞) | (-∞, ∞) |
| Logarithmic | log(ax + b) | ax+b > 0 → x > −b/a | (-∞, ∞) |
| Absolute Value | |ax + b| + c | (-∞, ∞) | [c, ∞) |
| Quadratic | ax² + bx + c | (-∞, ∞) | [vertex_y, ∞) if a>0; (-∞, vertex_y] if a<0 |
| sin / cos | sin(x), cos(x) | (-∞, ∞) | [-1, 1] |
| tan | tan(x) | x ≠ π/2 + nπ | (-∞, ∞) |
| Exponential | a·bˣ + c | (-∞, ∞) | (c, ∞) if a>0 |
| Piecewise | f₁(x) if x<k; f₂(x) if x≥k | Union of each piece's domain | Union 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].