Domain and Range Calculator
Find the domain and range of any function with step-by-step solutions. Fast, accurate, and easy-to-use domain and range calculator.
Share Your Feedback
How was your experience with this calculator?
The calculator provides step-by-step solutions, mathematical notation to help you understand how a function behaves rather than simply displaying an answer. It is useful for students, educators, and anyone working with mathematical functions.
What Are Domain and Range?
A function establishes a relationship between an input and an output. In function notation, f(x), the variable x represents the input, and f(x) represents the resulting output.
Domain: The set of all permitted input values for which a function is defined.
Range: The set of all output values that the function actually produces over its domain.
For example, consider:
\(f(x)=x^2\)
Every real number can be substituted for \(x\), so the domain includes all real numbers. However, squaring a real number cannot produce a negative result.
Therefore:
Domain: \((-\infty,\infty)\)
Range: \([0,\infty)\)
The codomain is another related concept. It represents the specified target set of a function, whereas the range contains only the values actually attained. Understanding this distinction is particularly important when studying inverse functions, mappings, and one-to-one functions.
To determine the domain of a function, identify input values that make the expression undefined, such as values that cause division by zero or produce negative radicands under even roots. These restrictions can be expressed using interval notation, as explained inOpenStax Precalculus.
How to Find the Domain of a Function
1. Rational functions
A rational function contains a polynomial expression divided by another polynomial. Its denominator cannot equal zero.
For example:
\(f(x)=\frac{1}{x-5}\)
Set the denominator equal to zero:
\(x-5=0\)
\(x=5\)
Since division by zero is undefined, exclude this value.
\(D=(-\infty,5)\cup(5,\infty)\)
2. Square root functions
For an even-indexed real radical, the expression inside the root must be nonnegative.
Consider:
\(f(x)=\sqrt{x-3}\)
The restriction is:
\(x-3\geq 0\)
Therefore:
\(D=[3,\infty)\)
Remember that odd-indexed roots, such as cube roots, can accept negative real inputs.
3. Logarithmic functions
The argument of a real logarithm must be strictly positive.
For:
\(f(x)=\ln(x+4)\)
The condition is:
\(x+4>0\)
Therefore:
\(D=(-4,\infty)\)
How to Find the Range of a Function
The calculator uses symbolic computation to analyze mathematical expressions and identify domain restrictions. Results depend on the supported function types and the complexity of the expression. Graph visualization provides an additional way to inspect the calculated behavior.
Consider a quadratic function:
\(f(x)=x^2-4x+1\)
Complete the square:
\(f(x)=(x-2)^2-3\)
Because a squared real expression cannot be negative, \((x-2)^2\geq 0\). Therefore, the minimum output is \(-3\), attained when \(x=2\).
Thus, the range is:
\(R=[-3,\infty)\)
For other functions, different mathematical techniques may be needed:
- Graph analysis: Examine the vertical extent of the graph and identify included or excluded endpoints.
- Algebraic rearrangement: Express \(x\) in terms of \(y\) and identify which output values are possible.
- Calculus: Use derivatives to investigate local and global extrema and determine whether a function has upper or lower bounds.
- Limits and asymptotes: Examine function behavior near excluded points and as inputs approach infinity.
For example, consider:
\(f(x)=\frac{1}{x}\)
The function can never produce zero because its numerator is always one.
Consequently, its domain and range are:
\(D=\mathbb{R}\setminus\{0\}\)
\(R=\mathbb{R}\setminus\{0\}\)
The horizontal asymptote \(y=0\) indicates that the function approaches zero as \(x\) approaches positive or negative infinity, but never attains it. However, an asymptote alone does not necessarily indicate an excluded range value. The complete range must be established by examining the function's behavior over its domain.
Domain and Range of Common Functions
Different function families have recognizable domain and range properties. The following table shows their standard domains and ranges under real-valued definitions.
| Function | Domain | Range |
| \(f(x)=x^2\) | \(\mathbb{R}\) | \([0,\infty)\) |
| \(f(x)=x^3\) | \(\mathbb{R}\) | \(\mathbb{R}\) |
| \(f(x)=\sqrt{x}\) | \([0,\infty)\) | \([0,\infty)\) |
| \(f(x)=\sqrt[3]{x}\) | \(\mathbb{R}\) | \(\mathbb{R}\) |
| \(f(x)=\lvert x\rvert\) | \(\mathbb{R}\) | \([0,\infty)\) |
| \(f(x)=\frac{1}{x}\) | \(\mathbb{R}\setminus\{0\}\) | \(\mathbb{R}\setminus\{0\}\) |
| \(f(x)=e^x\) | \(\mathbb{R}\) | \((0,\infty)\) |
| \(f(x)=\ln(x)\) | \((0,\infty)\) | \(\mathbb{R}\) |
| \(f(x)=\sin(x)\) | \(\mathbb{R}\) | \([-1,1]\) |
| \(f(x)=\cos(x)\) | \(\mathbb{R}\) | \([-1,1]\) |
| \(f(x)=\tan(x)\) | \(\mathbb{R}\setminus\{\frac{\pi}{2}+k\pi:k\in\mathbb{Z}\}\) | \(\mathbb{R}\) |
Frequently Asked Questions
1. Can domain and range be the same?
Yes. For the identity function \(f(x)=x\), both the domain and range are all real numbers, represented by \(\mathbb{R}\).
2. Can a function have a restricted domain but an unrestricted range?
Yes. For the logarithmic function \(f(x)=\ln(x)\), the domain is restricted to positive real numbers, while the range includes all real numbers.
Domain: \((0,\infty)\)
Range: \((-\infty,\infty)\)
3. How do you find domain and range from a graph?
The domain represents the horizontal extent of the graph, while the range represents its vertical extent. Check open circles, closed circles, gaps, and asymptotes to identify excluded values.
4. Does every function have a maximum and minimum?
No. Some functions are unbounded, while others approach limiting values without attaining them. Maximum and minimum values must be established from the function's behavior over its domain.
5. Why are domain and range important in calculus?
They help establish where functions are defined and which outputs are possible. These concepts are important when studying limits, continuity, derivatives, inverse functions, and optimization.
Verified internal links
Use these contextual links in the content:
- Inverse Function Calculator — in the discussion of domain and range of inverse functions.
- Critical Points Calculator — in the section about extrema and calculus.
- Interval Notation Calculator — in the interval notation section.
References
1. Stewart, J., Clegg, D. K., & Watson, S. (2021). Calculus: Early Transcendentals (9th ed.). Cengage Learning.
2. Hass, J. R., Heil, C. E., & Weir, M. D. (2018). Thomas' Calculus: Early Transcendentals (14th ed.). Pearson.
3. Larson, R., & Edwards, B. H. (2018). Calculus (11th ed.). Cengage Learning.
4. Strang, G., & Herman, E. (2016). Calculus: Volume 1. OpenStax.
5. Strang, G., & Herman, E. (2016). Calculus: Volume 3. OpenStax.
6. Weisstein, E. W. (n.d.). Critical Point. MathWorld—A Wolfram Web Resource.
Author's Review
Reviewed by the theMathex Engineering Team