Domain and Range Calculator

Enter a function of x to get its domain and range in interval notation — shown on a graph with the domain marked along the x-axis and the range along the y-axis. Free on LK Forge — no sign-up.

Domain—
Range—

domain (on the x-axis)range (on the y-axis)

How to Find the Domain and Range

Enter a function of x and read its domain and range from the result and the graph.

1

Enter a function

Type a function of x, such as sqrt(x), 1/(x - 2) or x². Functions like sqrt, ln, log and abs are supported.

2

Read the domain

The domain is every x-value the function accepts, in interval notation. Square roots exclude negatives, logs need a positive input, and fractions exclude values that make the denominator zero.

3

Read the range

The range is every y-value the function produces. On the graph, the domain is drawn along the x-axis and the range along the y-axis so you can see both at a glance.

Frequently Asked Questions

What is the domain of a function?
The domain is the set of all input values (x) for which the function is defined. For example, sqrt(x) has domain [0, ∞) because you cannot take the square root of a negative number, and 1/x has domain (−∞, 0) ∪ (0, ∞) because it is undefined at x = 0. Domain restrictions usually come from square roots of negative numbers, division by zero, or logarithms of non-positive numbers.
What is the range of a function?
The range is the set of all output values (y) the function can produce. For x², the range is [0, ∞) because a square is never negative; for sin(x) it is [−1, 1]; and for 1/x it is (−∞, 0) ∪ (0, ∞). Because the range depends on the function's shape rather than a simple rule, the calculator finds it by evaluating the function densely across its domain and tracking the highest and lowest values reached.
How is the domain and range written?
In interval notation. A round bracket ( or ) excludes an endpoint, a square bracket [ or ] includes it, ∞ marks an unbounded end, and ∪ joins separate pieces — so [0, ∞) means zero and every value above it. For a domain built from more than one disconnected piece, such as (−∞, 0) ∪ (0, ∞), the ∪ symbol lists each piece separately.
How does the calculator work?
The calculator samples the function across the real line to find where it is defined and which y-values it reaches, then reports both in interval notation. It handles the common textbook functions well; for unusual or piecewise functions, check the graph alongside the result. You can type functions using standard notation such as sqrt(x), sin(x) or 1/x, and the tool parses them the same way a graphing calculator would.
Is my data sent anywhere?
No — everything runs in your browser with JavaScript; nothing you type is uploaded or stored. The calculator keeps working even without an internet connection. No data ever leaves your device.