Function Domain Calculator

Find the domain of a function with steps: every restriction from denominators, roots, logarithms and trig functions, in interval and set-builder notation.

Use x as the variable: x^2, sqrt(x), ln(x), log(x), e^x, sin, cos, tan, sec, csc, cot, asin, acos, atan, abs(x), pi. Put function arguments in parentheses.

Examples

Domain of f(x) = √(x − 2)/(x − 5)

[2, 5) ∪ (5, ∞)

Restricted domain

Interval notation
[2, 5) ∪ (5, ∞)
Set-builder notation
{x ∈ ℝ | x ≥ 2, x ≠ 5}
Conditions on x
x ≥ 2x ≠ 5

Excluded value: x = 5

Restrictions detected

FromConditionSolution
√(x − 2)x − 2 ≥ 0x ≥ 2
√(x − 2)/(x − 5)x − 5 ≠ 0x ≠ 5

Step-by-Step Solution

  1. Step 1 — Check the square root

    The expression under the square root in √(x − 2) must be nonnegative for a real result.

    x − 2 ≥ 0

    Therefore: x ≥ 2

  2. Step 2 — Check the denominator

    Division by zero is undefined, so the denominator of √(x − 2)/(x − 5) cannot be 0.

    x − 5 ≠ 0

    Therefore: x ≠ 5

  3. Step 3 — Combine the restrictions

    Every restriction must hold at the same time, so the domain is the intersection of the individual solutions.

    x − 2 ≥ 0 ⇒ x ≥ 2

    x − 5 ≠ 0 ⇒ x ≠ 5

    Domain: [2, 5) ∪ (5, ∞)

Domain: [2, 5) ∪ (5, ∞)

Number line

Domain on a number lineShaded parts are in the domain. [2, 5): closed dot at 2, open dot at 5; (5, ∞): open dot at 5.25
  • Closed dot: endpoint included
  • Open dot: value excluded
  • Thick line: included values

Domain rules reference

Function typeExampleDomain restriction
Polynomialx² + 3x − 2All real numbers
Rational (fraction)p(x)/q(x)Denominator q(x) ≠ 0
Square root / even root√g(x), g(x)^(1/4)g(x) ≥ 0
Odd rootx^(1/3)All real numbers
Negative exponentg(x)^(−2)g(x) ≠ 0
Logarithmln g(x), log g(x)g(x) > 0
ExponentialeˣAll real numbers
tan(x), sec(x)cos(x) ≠ 0: x ≠ π/2 + kπ
cot(x), csc(x)sin(x) ≠ 0: x ≠ kπ
sin(x), cos(x), arctan(x)All real numbers
arcsin, arccosarcsin g(x)−1 ≤ g(x) ≤ 1

The domain is the set of allowed inputs x; the range is the set of outputs y the function actually produces. Find the outputs with the Function Range Calculator. To see what happens near an excluded value, such as a hole or a vertical asymptote, use the Limit Calculator. Inside the domain you can differentiate with the Derivative Calculator, find a tangent line with the Tangent Line Calculator, or evaluate f(x) with the Scientific Calculator.

This function domain calculator finds the domain of a function, the set of x-values for which f(x) is a real number. It identifies each restriction in the expression (denominators, square roots, logarithms and trigonometric functions), solves it, and intersects the results.

The answer is given in interval notation, set-builder notation and inequality form, with the excluded values, a step-by-step solution and a number line. Exact boundaries such as √3 stay exact, and values excluded by a factor that later cancels are kept out of the domain.

Worked Calculation Examples

ScenarioResultCalculation Step
Polynomial: f(x) = x² + 2x + 1(−∞, ∞)Polynomials are defined for every real x: there are no denominators, roots or logarithms.
Rational: f(x) = 1/(x − 3)(−∞, 3) ∪ (3, ∞)The denominator x − 3 cannot be 0, so x ≠ 3.
Square root: f(x) = √(x − 2)[2, ∞)The radicand must be nonnegative: x − 2 ≥ 0, so x ≥ 2. The endpoint 2 is included.
Logarithm: f(x) = ln(x + 4)(−4, ∞)The argument must be positive: x + 4 > 0, so x > −4. The endpoint is excluded.
Combined: f(x) = √(x + 1)/(x − 2)[−1, 2) ∪ (2, ∞)The root needs x ≥ −1 and the denominator needs x ≠ 2. Both must hold, so remove 2 from [−1, ∞).
Removable discontinuity: f(x) = (x² − 4)/(x − 2)(−∞, 2) ∪ (2, ∞)The expression simplifies to x + 2, but the original divides by zero at x = 2, so x = 2 stays excluded. The graph is a line with a hole at (2, 4).

What Is the Domain of a Function?

The domain of a function is the set of all input values x for which the function gives a real output. For f(x) = 1/(x − 3), every real number works except x = 3, where the denominator is 0, so the domain is (−∞, 3) ∪ (3, ∞).

Unless a problem says otherwise, the domain is the largest set of real numbers for which the formula makes sense, often called the natural or implied domain.

How to Find the Domain

Start with all real numbers. Then look for each operation that can fail and write its condition: denominators ≠ 0, expressions under an even root ≥ 0, logarithm arguments > 0. Solve each condition, then keep only the x-values that satisfy all of them at once.

For f(x) = √(x − 2)/(x − 5): the root needs x − 2 ≥ 0, so x ≥ 2, and the denominator needs x − 5 ≠ 0, so x ≠ 5. Together: [2, 5) ∪ (5, ∞).

Domain of Polynomial Functions

Polynomials such as x² + 3x − 2 or 3x − 7 involve only addition, subtraction and multiplication, which work for every real number. Their domain is always all real numbers, (−∞, ∞). The same is true for eˣ, sin(x), cos(x), arctan(x), |x| and odd roots such as ∛x.

Domain of Rational Functions

A rational function is a fraction of polynomials. Set the denominator equal to 0, solve, and exclude those values. For 1/(x² − 9), x² − 9 = (x − 3)(x + 3) = 0 at x = 3 and x = −3, so the domain is (−∞, −3) ∪ (−3, 3) ∪ (3, ∞).

Do not simplify first. (x² − 4)/(x − 2) reduces to x + 2, but the original function divides by zero at x = 2, so x = 2 is still excluded. The graph of the original function has a hole there.

Domain of Radical Functions

For a square root, or any even root, the expression inside must be greater than or equal to 0. √(x − 4) needs x − 4 ≥ 0, so the domain is [4, ∞); √(5 − x) needs x ≤ 5, so (−∞, 5].

When the inside is a quadratic or a fraction, solve the inequality with a sign chart. √(x² − 4) needs x ≤ −2 or x ≥ 2. If the root is in a denominator, as in 1/√(x − 1), the inside must be strictly positive, so the domain is (1, ∞). Odd roots have no restriction.

Domain of Logarithmic Functions

ln(x) and log(x) are defined only for positive inputs, so the argument must be strictly greater than 0. ln(x + 3) needs x > −3, giving (−3, ∞). ln(x² − 4) needs x² − 4 > 0, giving (−∞, −2) ∪ (2, ∞).

Unlike a square root, the argument cannot equal 0, so logarithm boundaries are always open (parentheses, not brackets).

Domain of Trigonometric Functions

sin(x) and cos(x) are defined for every real number. tan(x) = sin(x)/cos(x) and sec(x) = 1/cos(x) are undefined where cos(x) = 0, that is x = π/2 + kπ for any integer k. cot(x) = cos(x)/sin(x) and csc(x) = 1/sin(x) are undefined where sin(x) = 0, x = kπ.

The inverse functions arcsin(x) and arccos(x) only accept inputs from −1 to 1, while arctan(x) accepts every real number.

Combining Domain Restrictions

When a function has several restrictions, all of them must hold at the same time, so intersect the solution sets. For ln(x − 2)/(x − 5): the logarithm needs x > 2 and the denominator needs x ≠ 5, so the domain is (2, 5) ∪ (5, ∞).

Work from the inside out with nested functions. For ln(√(x + 1)), the root needs x + 1 ≥ 0 and the logarithm needs √(x + 1) > 0, which means x + 1 > 0. Together the domain is (−1, ∞).

Domain in Interval Notation

Interval notation uses square brackets [ ] for included endpoints and parentheses ( ) for excluded endpoints and for ±∞. [2, 5) means 2 ≤ x < 5. The symbol ∪ joins separate pieces, so (−∞, 3) ∪ (3, ∞) means every real number except 3. An empty domain is written ∅.

Domain in Set-Builder Notation

Set-builder notation describes the domain by its condition: {x ∈ ℝ | x ≥ 2, x ≠ 5} reads “all real x such that x is at least 2 and not equal to 5.” It is especially convenient when a domain is all real numbers except a few values, or has infinitely many exclusions, such as {x ∈ ℝ | x ≠ π/2 + kπ, k ∈ ℤ} for tan(x).

Worked Domain Examples

x² + 2x + 1: a polynomial, so the domain is (−∞, ∞).

1/(x − 3): x − 3 ≠ 0, so x ≠ 3 and the domain is (−∞, 3) ∪ (3, ∞).

√(x − 2): x − 2 ≥ 0, so the domain is [2, ∞).

ln(x + 4): x + 4 > 0, so the domain is (−4, ∞).

√(x + 1)/(x − 2): x ≥ −1 and x ≠ 2, so the domain is [−1, 2) ∪ (2, ∞).

√((x + 1)/(x − 2)): the fraction must be ≥ 0 and x ≠ 2. A sign chart gives x ≤ −1 or x > 2, so the domain is (−∞, −1] ∪ (2, ∞).

Common Domain Mistakes

Cancelling a factor before finding the domain, which loses excluded values such as x = 2 in (x² − 4)/(x − 2). Using ≥ 0 for a logarithm (it must be > 0). Forgetting that a square root in a denominator must be strictly positive. Solving √ and denominator restrictions separately but then listing them instead of intersecting them. Writing a bracket next to ∞, or a bracket at a value that is excluded. Confusing the domain (allowed x) with the range (resulting y).

How to Use the Function Domain Calculator

  1. Type the function, for example sqrt(x - 2)/(x - 5), ln(x^2 - 4) or 1/(x^2 - 9). Use sqrt( ) for square roots, ln( ) or log( ) for logarithms, ^ for powers, and put function arguments in parentheses.
  2. Press Find Domain, or tap one of the examples.
  3. Read the domain in interval notation, set-builder notation and inequality form, together with any excluded values. Exact boundaries such as √3 are kept exact.
  4. Check the restrictions table and the step-by-step solution: each denominator, square root, logarithm or trigonometric function in your expression produces one condition, and the domain is where all of them hold at once.
  5. Use the number line to see which intervals are included, with closed dots for included endpoints and open dots for excluded values.

Frequently Asked Questions

What is the domain of a function?

The set of all real x-values for which the function gives a real output. For f(x) = √(x − 2) it is x ≥ 2, written [2, ∞).

How do I find the domain of a function?

Start with all real numbers and exclude every value that breaks a rule: denominators cannot be 0, expressions under even roots must be ≥ 0, and logarithm arguments must be > 0. Solve each condition and intersect the results.

How do I find the domain of a rational function?

Set the denominator equal to 0, solve for x, and exclude those values. For 1/(x² − 9), x = 3 and x = −3 are excluded, so the domain is (−∞, −3) ∪ (−3, 3) ∪ (3, ∞).

How do I find the domain of a square root function?

Require the expression under the root to be greater than or equal to 0 and solve that inequality. √(x − 4) gives x ≥ 4; √(x² − 4) gives x ≤ −2 or x ≥ 2.

How do I find the domain of a logarithmic function?

Require the argument to be strictly greater than 0. ln(x + 3) needs x > −3, so the domain is (−3, ∞). The argument cannot be 0 or negative.

Why can't the denominator equal zero?

Division by zero has no value: there is no number that times 0 gives a nonzero result, and 0/0 is not a single number either. Any x that makes a denominator 0 is therefore outside the domain.

What does domain mean in interval notation?

It lists the allowed x-values as intervals: [ ] includes an endpoint, ( ) excludes it, and ∪ joins pieces. (−∞, 3) ∪ (3, ∞) is every real number except 3.

What is the difference between domain and range?

The domain is the set of allowed inputs x; the range is the set of outputs y the function actually takes. For f(x) = √x, both are [0, ∞), but for f(x) = x² the domain is all real numbers while the range is [0, ∞).

Can a function have an empty domain?

Yes, for a real-valued formula that is never defined. √(−x² − 1) needs −x² − 1 ≥ 0, which no real x satisfies, so its domain is the empty set ∅.

How do I find the domain of a function with a square root in the denominator?

The expression under the root must be ≥ 0 for the root and the root itself must not be 0, so the inside must be strictly positive. 1/√(x − 1) needs x − 1 > 0, giving (1, ∞).

Why is a canceled value still excluded from the domain?

The domain belongs to the function as written. (x² − 1)/(x − 1) simplifies to x + 1 for x ≠ 1, but at x = 1 the original gives 0/0, which is undefined. The simplified formula describes the same function only where the original is defined; its graph has a hole at x = 1.

Last updated: September 27, 2026.