Domain and Range Calculator

Find the domain and range of polynomial, rational, square root, log, exponential, trig and absolute value functions, with steps, intervals and a graph.

Domain and Range Calculator

Calculate the domain and range of polynomial, rational, radical, absolute value, logarithmic, exponential, trigonometric and inverse trigonometric functions. Get step-by-step explanations and visualizations.

Function Type Selection

Polynomial functions have domain: all real numbers (ℝ). Form used: f(x) = a·xⁿ + b·x + c (for degree 1: f(x) = a·x + c, and b is not used).

Display Options

Domain and Range Calculator: Getting the Right Inputs and Outputs

Most students assume the domain of a function is always "all real numbers" until they hit a denominator or a square root. That assumption fails the first time you try f(x) = 1/x or f(x) = √(x - 2). The domain and range calculator finds the exact set of allowable x-values and the exact set of possible y-values for polynomial, rational, radical, absolute value, logarithmic, exponential, trigonometric and inverse trigonometric functions, and it shows the reasoning step by step. You pick the function type, enter its coefficients, choose notation style (interval, set-builder, or inequality), and the calculator returns the domain and range along with a graph that marks the horizontal extent (domain) and vertical extent (range).

  • What the Calculator Covers: Polynomial, rational, radical, absolute value, logarithmic, exponential, trigonometric, and inverse trigonometric functions. Custom functions are graphed but domain and range are not computed for them.
  • How It Works: You select a function type, enter the required coefficients (e.g., for a quadratic: leading coefficient a, linear coefficient b, constant term c), choose notation, and click "Calculate Domain & Range." The result includes the domain and range in your chosen notation plus a detailed explanation.
  • What You Get: Domain and range in interval, set-builder, or inequality notation. A step-by-step explanation. A function graph with the domain shown as the horizontal extent and the range as the vertical extent.
  • What It Does Not Do: Custom functions (typed in manually) are graphed only; domain and range are not computed for them. Piecewise functions are not supported.

What Domain and Range Actually Mean

The domain is the set of all possible input values, the x-values you can plug into the function without breaking the rules of arithmetic. The range is the set of all possible output values, the y-values the function produces from those inputs. On a graph, the domain corresponds to the horizontal span of the curve (all x-coordinates where the graph exists), and the range corresponds to the vertical span (all y-coordinates the graph reaches). OpenStax Precalculus 2e, Section 3.2, and Common Core State Standards HSF-IF.A.1 and HSF-IF.B.5 define these terms this way: a function assigns exactly one output to each input, and its domain is the set of all inputs for which the function is defined.

The confusion between domain and range is the single most common mistake in algebra. Domain answers “what can I put in?” Range answers “what can come out?” For f(x) = x², the domain is all real numbers because you can square any real number. The range is [0, ∞) because a square is never negative. For f(x) = √x, the domain is [0, ∞) because you cannot take the square root of a negative number. The range is also [0, ∞) because the principal square root is never negative. The same output interval happens for different reasons, one from the operation (squaring), the other from the rule (radicand ≥ 0).

The Three Domain Restrictions You Must Know

Three operations force a restricted domain. Every function that uses one of these needs the corresponding check.

Denominators

A denominator cannot be zero. For any rational function of the form f(x) = P(x)/Q(x), the domain excludes every x that makes Q(x) = 0. Each zero becomes either a vertical asymptote (if the factor does not cancel) or a hole (if the factor cancels). The calculator handles both cases for rational functions where numerator and denominator are up to degree 2. OpenStax Precalculus 2e, Section 5.6, covers asymptotes and holes in detail.

Even Roots

The radicand of an even-index root (square root, fourth root, etc.) must be ≥ 0. For f(x) = √(ax + b), the domain is the solution to ax + b ≥ 0. If a > 0, the domain is [-b/a, ∞). If a < 0, the domain is (-∞, -b/a]. If a = 0 and b ≥ 0, the domain is all real numbers. If a = 0 and b < 0, the domain is empty, there is no real number that makes the radicand non-negative.

Logarithms

The argument of a logarithm must be strictly positive. For f(x) = a·log(x - h) + k, the domain is x > h. For a logarithm with a base other than 10, e, or 2, the same rule applies. The calculator uses this rule for logarithmic functions.

Domain of a Function: How to Find It Step by Step

To find the domain of any function manually, check for these three restrictions in order:

  • If the function has a denominator, set it ≠ 0 and solve.
  • If the function has an even root, set the radicand ≥ 0 and solve the inequality.
  • If the function has a logarithm, set the argument > 0 and solve.

Then take the intersection of all resulting intervals. For a rational function like f(x) = (x + 1)/(x² - 4), the denominator zeros are x = 2 and x = -2, so the domain is (-∞, -2) ∪ (-2, 2) ∪ (2, ∞).The calculator does exactly this process, showing each step in the detailed explanation.

Range of a Function: Vertex, Asymptotes, and Bounds

Finding the range is harder than finding the domain because there is no single rule that covers every function family. The calculator uses four main methods depending on the function type:

Vertex (for Quadratics and Other Even-Degree Polynomials)

For a quadratic f(x) = ax² + bx + c, the vertex is at x = -b/(2a). The y-coordinate of the vertex is the minimum (if a > 0) or the maximum (if a < 0). The range is [vertex y, ∞) for upward-opening parabolas or (-∞, vertex y] for downward-opening. For quartic polynomials (degree 4) with a ≠ 0, the calculator finds the unique critical point from the simplified form f(x) = ax⁴ + bx + c.

Horizontal Asymptotes (for Rational Functions)

For a rational function, the range may exclude the value of the horizontal asymptote, but not always. The function f(x) = x/(x² + 1) has a horizontal asymptote at y = 0, yet it attains y = 0 at x = 0, so 0 is in the range. The calculator checks whether the asymptote value is actually attained by solving y·D(x) - N(x) = 0 and discarding solutions that match a pole.

Amplitude and Vertical Shift (for Sine and Cosine)

For f(x) = a·sin(bx) + d, the range is [d - |a|, d + |a|]. The same applies to cosine. For tangent and cotangent, the range is all real numbers. For secant and cosecant, the range is (-∞, d - |a|] ∪ [d + |a|, ∞).

Unbounded Ranges

Linear functions (non-horizontal), odd-degree polynomials, exponential functions with base > 1, and logarithmic functions all have unbounded ranges, either all real numbers or a ray extending to infinity. The calculator identifies these cases automatically.

Writing Domain and Range in Interval Notation

Interval notation is the standard way to write domain and range answers in algebra and precalculus. It uses parentheses for excluded endpoints and brackets for included endpoints.

  • (a, b) means all numbers between a and b, not including a or b.
  • [a, b] means all numbers between a and b, including a and b.
  • [a, b) includes a but not b.
  • (-∞, a) means all numbers less than a; (a, ∞) means all numbers greater than a. Infinity always gets a parenthesis because it is not a number you can include.
  • When the domain or range has separate pieces, join them with the union symbol ∪. For example, the domain of f(x) = 1/x is (-∞, 0) ∪ (0, ∞).

The calculator offers three notation styles: interval, set-builder, and inequality. Switch between them in the display options before clicking calculate. The detailed explanation shows how the answer would look in all three, so you can check your own work.

Range of a Function: Common Family Patterns

The following table summarises the range patterns for the most common function families. Use it as a quick reference when you check the calculator's output or solve problems manually.

Range Patterns for Common Function Families
Function FamilyRange (Parent Form)Example
Linear (non-horizontal)All real numbers (−∞, ∞)f(x) = 2x + 3 → range (−∞, ∞)
Quadratic (a > 0)[vertex y, ∞)f(x) = x² → range [0, ∞)
Quadratic (a < 0)(−∞, vertex y]f(x) = −x² → range (−∞, 0]
Cubic (degree 3)All real numbers (−∞, ∞)f(x) = x³ → range (−∞, ∞)
Square root (c > 0)[d, ∞) where d is vertical shiftf(x) = √x + 2 → range [2, ∞)
Absolute value (a > 0)[k, ∞) where k is vertical shiftf(x) = |x| − 1 → range [−1, ∞)
Exponential (a > 0, b > 1)(k, ∞) where k is vertical shiftf(x) = 2ˣ + 1 → range (1, ∞)
LogarithmicAll real numbers (−∞, ∞)f(x) = ln x → range (−∞, ∞)
Sine / Cosine[d − |a|, d + |a|]f(x) = 3 sin x → range [−3, 3]
Tangent / CotangentAll real numbers (−∞, ∞)f(x) = tan x → range (−∞, ∞)
Arcsin / Arccos[−π/2, π/2] for arcsin; [0, π] for arccosf(x) = arcsin x → range [−π/2, π/2]
ArctanAll real numbers (−∞, ∞)f(x) = arctan x → range (−π/2, π/2)

Annotated Graph: Domain on the X-Axis, Range on the Y-Axis

When you enable the graph option, the calculator draws the function in blue. Two shaded regions overlay the axes: the horizontal extent (domain) is highlighted along the x-axis, and the vertical extent (range) is highlighted along the y-axis. For f(x) = x², the x-axis highlight runs from −∞ to ∞ (a solid line across the visible window), while the y-axis highlight runs from 0 upward (a solid line from y = 0 to the top of the window). The graph does not show excluded points, the table view is the only way to confirm whether a single x-value is missing, but the highlighted regions give an immediate visual answer.

Cheat-Sheet Teaser: The Parent-Function Table

The table above is a condensed version of a larger parent-function reference that lists domain, range, intercepts, asymptotes, and key points for every family from linear to inverse trigonometric. That full table is the go-to resource when you are solving problems without a calculator: it fits on one page and covers all the functions this calculator supports.

One Caveat Before You Rely on the Calculator

The calculator handles polynomial, rational, radical, absolute value, logarithmic, exponential, trigonometric, and inverse trigonometric functions. It does not compute domain or range for piecewise functions, composite functions, or functions with nested radicals beyond a single square root. If you enter a custom function, you get a graph but no computed domain or range. For those cases, a piecewise function with three pieces or a composition like f(g(x)), you still need to find the domain and range manually, applying the same restrictions the calculator uses for simpler forms. The detailed explanation it shows for standard types is a model for how to do that work yourself.

Common Questions

What does “domain” mean?

The domain is the set of all possible input values (x-values) for which a function is defined. For f(x) = 1/x, the domain is all real numbers except x = 0, because division by zero is undefined. The calculator finds this by checking denominator zeros, radicand restrictions, and logarithm arguments.

What does “range” mean?

The range is the set of all possible output values (y-values) that a function can produce. For f(x) = x², the range is [0, ∞) because squaring any real number gives a non-negative result. The calculator determines the range by analysing the function's vertex, asymptotes, amplitude, and bounds.

Can the calculator show steps?

Yes. Enable “Show detailed explanation” in the display options before clicking calculate. The calculator then shows each restriction it checks and the resulting interval in your chosen notation.

Does the calculator support custom functions?

You can enter a custom function using operators like +, -, *, /, ^ and functions like sqrt(), sin(), cos(), tan(), ln(), log() (base 10), exp(), and abs(). The calculator graphs the custom function, but it does not compute the domain or range automatically, you must read those off the graph or determine them manually.

Can I change how results are displayed?

Yes. Use the Notation Type dropdown to switch between Interval Notation, Set-Builder Notation, and Inequality Notation. The calculator recalculates nothing, it simply reformats the same intervals in the chosen style.

Guides on this site