Home › Calculators › Domain and Range Calculator

Domain and Range Calculator

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

      1. Type the function f(x), for example sqrt(x - 2), (2x + 1)/(x - 3) or ln(x^2 - 4), or tap an example.
      2. Press Find domain & range (or Enter).
      3. Read the answers in interval notation and set-builder notation at the top.
      4. Check the reasoning: the domain steps list each restriction and the range steps list the limits, turning points and endpoints used.
      5. 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)RequirementExampleDomain
      PolynomialNonex³ − 2x + 1(−∞, ∞)
      Fraction P/QQ ≠ 01/(x² − 4)(−∞, −2) ∪ (−2, 2) ∪ (2, ∞)
      Square root √u (any even root)u ≥ 0√(9 − x²)[−3, 3]
      Root in a denominator 1/√uu > 01/√(x + 1)(−1, ∞)
      Cube root ∛u (any odd root)None∛(x − 5)(−∞, ∞)
      Logarithm ln u, log uu > 0ln(x² − 4)(−∞, −2) ∪ (2, ∞)
      arcsin u, arccos u−1 ≤ u ≤ 1arcsin(x/2)[−2, 2]
      tan u, sec ucos u ≠ 0tan(x)x ≠ π/2 + kπ
      cot u, csc usin u ≠ 0cot(x)x ≠ kπ

      Domain and range of common parent functions

      FunctionDomainRange
      f(x) = x² (and any even power)(−∞, ∞)[0, ∞)
      f(x) = x³ (and any odd power)(−∞, ∞)(−∞, ∞)
      f(x) = √x[0, ∞)[0, ∞)
      f(x) = 1/xx ≠ 0y ≠ 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 xx ≠ π/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.

      Related tools

      Inequality CalculatorSolve linear, quadratic, rational and absolute value inequalities with steps and a number line.Graphing CalculatorPlot multiple functions with zoom, pan, intersections and a value table.Inverse Function CalculatorFind the inverse f⁻¹(x) of a function with steps, domain restrictions and a graph.Derivative CalculatorSymbolic derivative of any f(x) up to 5th order, with steps, slope at a point and a graph.Asymptote CalculatorFind vertical, horizontal and slant asymptotes and holes of a function, with graph and reasoning.Function Composition CalculatorFind f(g(x)), g(f(x)), f + g, f · g and f / g with values at a point and domains.Exponent CalculatorRaise any number to a power, including negative and fractional exponents.Logarithm CalculatorCalculate log in any base, ln, log10, log2 and antilog with change-of-base steps.Quadratic Equation SolverSolve ax² + bx + c = 0 with exact roots, steps, vertex and a parabola graph.Matrix CalculatorAdd, multiply, invert and row-reduce matrices up to 5×5 with exact fractions and steps.Prime Number CheckerCheck if a number is prime, factor it with a factor tree and list primes in a range.GCF and LCM CalculatorFind the GCF and LCM of two or more numbers with Euclid steps and prime factorization.Cubic Yard CalculatorConvert length, width and depth in any unit to cubic yards, cubic feet, m³ and material weight.Factorial CalculatorExact n! up to 5000! with digit count, trailing zeros and double factorial.Prime Factorization CalculatorFind prime factors in exponent form with a factor tree, divisor count and divisors list.Modulo CalculatorCalculate a mod n and the quotient, with floored, truncated and Euclidean rules.Exponential Growth CalculatorExponential growth and decay: final amount, rate or time, discrete or continuous.Linear Regression CalculatorLeast-squares line of best fit: slope, intercept, r, r², predictions and a scatter plot.System of Equations SolverSolve 2×2, 3×3 and 4×4 linear systems with exact fractions and step-by-step working.Cubic Equation SolverSolve ax³ + bx² + cx + d = 0 for real and complex roots with steps and a graph.Summation CalculatorEvaluate sigma notation: sum any expression in n from a to b with partial sums and a chart.Arithmetic Sequence CalculatorFind the n-th term, sum and full list of an arithmetic sequence, or d from two terms.Geometric Sequence CalculatorFind the n-th term, sum and infinite sum of a geometric sequence, or r from two terms.Fibonacci CalculatorExact n-th Fibonacci number (BigInt), sequence lists, Fibonacci check and golden ratio.Factors CalculatorAll factors and factor pairs of a number, prime factors, divisor count and perfect check.Depth of Field CalculatorNear and far focus limits, depth of field and hyperfocal distance for any camera or lens.Crop Factor CalculatorCrop factor, full-frame equivalent focal length and aperture, and field of view for any sensor.Completing the Square CalculatorRewrite ax² + bx + c in vertex form a(x − h)² + k step by step and solve it.Exposure Value CalculatorEV from aperture, shutter and ISO, or solve any missing setting with sunny 16 presets.Factoring Trinomials CalculatorFactor trinomials and polynomials: GCF, ac method, difference of squares, cubes, with steps.Integral CalculatorDefinite integral of f(x) from a to b with adaptive Simpson, area graph and antiderivative.Least Common Denominator CalculatorFind the LCD of two or more fractions and rewrite them as equivalent fractions, with steps.Limiting Reactant CalculatorFind the limiting reactant, theoretical yield and leftover excess from an equation.Parabola CalculatorVertex, focus, directrix, axis, intercepts and graph of a parabola from its equation.Polynomial Root FinderFind all real and complex roots of a polynomial up to degree 10, with the factored form.Prime Number List GeneratorList all primes in a range or the first N primes with a fast sieve; copy or download the list.Quadratic Regression CalculatorFit y = ax² + bx + c (or up to degree 6) to x, y data with R², predictions and a graph.Scatter Plot MakerPaste X,Y pairs for a scatter plot with trendline, equation, r and R². Download PNG.Modular Exponentiation CalculatorCompute a^b mod m for huge numbers with square-and-multiply steps (BigInt).Modular Inverse CalculatorFind a⁻¹ mod m with the extended Euclidean algorithm, step by step, for huge numbers too.Nth Term CalculatorFind the nth term formula of a sequence: arithmetic, geometric, quadratic or cubic.Partial Fraction Decomposition CalculatorSplit a rational function into partial fractions with the setup, equations and solution.Perpendicular Line CalculatorEquation of the perpendicular and parallel line through a point, with distance and a graph.Polar Graphing CalculatorGraph polar equations r = f(θ): roses, cardioids, spirals, with a θ range slider and PNG export.Polynomial CalculatorAdd, subtract, multiply, divide and evaluate polynomials; see roots, degree and a graph.Polynomial Long Division CalculatorDivide polynomials with the full long division layout, quotient, remainder and steps.Scale Factor CalculatorScale factor between similar figures, plus scaled lengths, areas (k²) and volumes (k³).Set CalculatorUnion, intersection, difference and complement of up to 4 sets, with a Venn diagram and counts.Table of Values CalculatorMake an x/y table for any function with a start, end and step, then plot it or copy CSV.Synthetic Division CalculatorDivide polynomials by x − c (synthetic table) or any polynomial (long division) with steps.3D Graphing CalculatorPlot z = f(x, y) surfaces and 3D parametric curves; rotate, zoom, add contours, save PNG.Algebra CalculatorSimplify, expand and factor algebraic expressions with exact answers and step-by-step working.Determinant CalculatorDeterminant of a 2×2 to 8×8 matrix with exact fractions and cofactor or row-reduction steps.Differential Equation SolverSolve first- and second-order ODEs step by step, with initial conditions, an RK4 check and a graph.Eigenvalue and Eigenvector CalculatorEigenvalues (real or complex), eigenvectors and the characteristic polynomial of a square matrix.Equation SolverSolve any equation for x: exact roots, complex roots, numeric answers, steps and a graph.Laplace Transform CalculatorLaplace transform of f(t) with the table rule used for each term and the region of convergence.Limit CalculatorEvaluate limits at a point or at infinity, one-sided or two-sided, with steps, table and graph.Linear Interpolation CalculatorInterpolate or extrapolate y for any x from two points or a data table, with steps and a plot.Matrix Inverse CalculatorFind the inverse of a 2×2 to 8×8 matrix in exact fractions with Gauss–Jordan or adjugate steps.Partial Derivative CalculatorPartial derivatives ∂/∂x, ∂/∂y, second and mixed orders with steps, gradient and Hessian.RREF CalculatorRow reduce any matrix to RREF with exact fractions, every row operation, pivots and rank.Stem and Leaf Plot MakerMake stem-and-leaf plots (standard, split stems or back-to-back) with a key; copy or save PNG.Taylor Series CalculatorTaylor and Maclaurin polynomials of any f(x) to order n, with exact coefficients and a graph.Antilog CalculatorInverse logarithm (antilog) in base 10, e, 2 or any base, with steps and scientific notation.Cramer's Rule CalculatorSolve 2x2 and 3x3 linear systems by Cramer's rule with every determinant shown step by step.Dot Plot MakerMake a dot plot or line plot from data or a frequency table; download PNG or SVG.Exponential Regression CalculatorFit y = a·bˣ or y = a·e^(kx) to data with r², predictions, residuals and a plot.
      See all 74 Algebra & Calculus Calculators →