Skip to content

Absolute Value Calculator

Solve |ax + b| compared with c and see the solution on a number line.

Inputs

Processed in your browser.

—

Filled circles include endpoints; hollow circles exclude them. Arrows continue without a finite bound.

|ax + b| ◇ c

Highlighted values satisfy the comparison; filled endpoints are included.

Result

Enter values and calculate.

How to use

This calculator solves one absolute-value expression, |ax + b|, compared with a constant c. It is useful when a linear quantity must stay within a tolerance, reach a fixed distance, or lie outside an allowed band. Enter coefficients rather than an entire equation. For example, a negative b is entered as −3, without typing x or absolute-value bars. Choose = for exact distance, < or ≤ for an inside band, and > or ≥ for an outside band.

Replace the editable example values with your own data, choose the comparison or dimension where available, and press Calculate. Enter submits the same form. The result is confirmed only after this action. Editing a number or changing a selection removes the previous result and disables Copy result, so an old answer cannot be mistaken for the current calculation. Clear empties the number fields while keeping the selected mode. After a successful calculation, Copy result copies the input and the numerical output as plain text. If clipboard access is blocked, select the visible text instead. Pale values are a runnable example. Focusing a number field clears all example numbers once. Your later entries are kept. Input preview — calculate to confirm the result.

How it works and reading the result

For nonzero a and positive c, the boundaries come from ax + b = −c and ax + b = c. Their order is sorted even when a is negative. A less-than comparison takes the interval between them; a greater-than comparison takes the two outside intervals. If a = 0, the expression is constant and is tested directly. If c is negative, a nonnegative absolute value can never equal it or be smaller than it.

The solution set uses semicolons between interval endpoints, so a decimal comma in translated output is unambiguous. Square brackets include an endpoint and parentheses exclude it. A union symbol joins separate parts. Braces identify isolated solutions. The number line shows filled or hollow circles using the same inclusion rules. Arrows mean the interval continues indefinitely. Boundary substitution evaluates the original absolute value at each numerical boundary; the comparison determines whether that boundary itself belongs to the solution.

Examples

Example 1: a = 2, b = −3, c = 5 and ≤ gives [−1; 4]. Substitution at −1 and 4 gives 5 in both cases. The interior point x = 0 gives 3 ≤ 5, while x = 5 gives 7 and fails. Changing only the comparison to < removes both endpoints without changing their positions.

Example 2: a = −2, b = 4, c = 0 and > gives (−∞; 2) ∪ (2; ∞). The expression is zero only at x = 2, so that one point is excluded. With ≥ instead, every real number is allowed. This is a useful way to distinguish a zero-width band from an empty solution.

Limits and troubleshooting

Only one linear absolute-value term is supported. Rearrange the original problem before entering coefficients; nested bars, multiple absolute values and variables on the other side are outside this tool. Use decimal points and no thousands separators. Coefficients may be zero or have magnitudes from 1e−12 to 1e12. Numerical boundaries are approximations, displayed with additional significant digits because rounding an endpoint to two decimals can change its meaning. A very narrow interval may need horizontal scrolling in the diagram. Use the set notation, not a pixel measurement, to decide membership.

Use at most 15 significant input digits. Boundaries too close to distinguish numerically are rejected; re-express the variable if necessary.

Frequently asked questions

Why can the result be empty?

For example, |x| < 0 is impossible because an absolute value is never negative. ∅ is a valid answer, not an input error.

Can an equation have all real solutions?

Yes. With a = 0, b = −4, c = 4 and =, the statement |−4| = 4 holds for every x.

Does negative a reverse the result?

The boundary order changes. The calculator sorts the two values before selecting inside or outside intervals.

Is the graph saved by Copy result?

No. Copy contains the original coefficients, comparison, solution and boundary checks as text. The diagram remains on the page.