Bookmarks    
nPr and nCr    
Random Number    
SD Calculator    
Sample Size    
Percent Error    
Density    
Molarity    
Molar Mass    
Ohm's Law    
Watts to Amps    
Voltage Drop    
Long Division    
Mixed Numbers    
Rounding    
Nth Root    
Exponents    
Half-Life    
Polar Form    
De Moivre    
3D Distance    
Point to Line    
Cross Product    
Determinant    
Sin Cos Tan    
Triangle Area    
Scale Factor    
Sector Area    
Ellipse Area    
Cube Volume    
Box Volume    
Sphere Volume    
Cone Volume    
Pipe Volume    
Time Duration    
Time Card    
Present Value    
Future Value    
Churn Rate    
A/B Test Calc    
SEO Traffic    
Ideal Weight    
Fat Intake    
Child Height    
Golf Handicap    
Heat Index    
Wind Chill    
Dew Point    
Download Time    
kWh to Cost    
AC Size (BTU)    
Heating Costs    
LED Savings    
Trip Gas Cost    
Tire Size    
Solar Output    
Solar Payback    
Battery Size    
Wall Area    
Gravel Needed    
Mortar Mix    
Slope Grade    
Curtain Size    
Soil Needed    
Sod Needed    
Ramp Length    
Blind Size    
Drain Slope    
Board Feet    
Heat Loss    
Furniture Fit    
Moving Boxes    
Plywood Cuts    
Shelf Sag    
   Add
Probability and random number calculators
Independent Events
Independent Events
Two Events Solver
Two Events Solver
Repeated Trials
Repeated Trials
Bayes' Theorem
Bayes' Theorem
Expected Value
Expected Value
Binomial Distribution
Binomial Distribution
nPr and nCr
nPr and nCr
Circular Permutation
Circular Permutation
With Repetition
With Repetition
Random Number
Random Number
Averages and statistics calculators
Average Calculator
Average Calculator
Mean Median Mode
Mean Median Mode
SD Calculator
SD Calculator
Quartiles & IQR
Quartiles & IQR
Frequency Table
Frequency Table
Correlation (r)
Correlation (r)
Normal Probability
Normal Probability
Z-Score Calculator
Z-Score Calculator
Confidence Interval
Confidence Interval
Sample Size
Sample Size
Mark & Recapture
Mark & Recapture
P-Value Calculator
P-Value Calculator
Percentage and ratio calculators
Percentage Calc
Percentage Calc
Percent Change
Percent Change
Percent Difference
Percent Difference
Percent Error
Percent Error
Ratio Calculator
Ratio Calculator
Discount Calculator
Discount Calculator
Sales Tax Calculator
Sales Tax Calculator
Margin Calculator
Margin Calculator
Speed calculators
Speed Calculator
Speed Calculator
Density and concentration calculators
Density
Density
Molarity
Molarity
Molar Mass
Molar Mass
Physics and electricity calculators
Ohm's Law
Ohm's Law
Watts to Amps
Watts to Amps
Resistor Colors
Resistor Colors
Voltage Drop
Voltage Drop
Unit conversion calculators
Weight Converter
Weight Converter
Shoe Size Converter
Shoe Size Converter
Integer and signed number calculators
Long Division
Long Division
LCM Calculator
LCM Calculator
GCF Calculator
GCF Calculator
Integer Calculator
Integer Calculator
Prime Factorization
Prime Factorization
Diophantine Solver
Diophantine Solver
Modulo Calculator
Modulo Calculator
Factor Calculator
Factor Calculator
Roman Numerals
Roman Numerals
Fraction, decimal and rounding calculators
Fraction Calculator
Fraction Calculator
Mixed Numbers
Mixed Numbers
Simplify Fractions
Simplify Fractions
Fraction to Decimal
Fraction to Decimal
Decimal to Fraction
Decimal to Fraction
Rounding
Rounding
Equation and inequality calculators
Linear Equation
Linear Equation
Linear Systems
Linear Systems
Quadratic Formula
Quadratic Formula
Absolute Value
Absolute Value
Quadratic Inequality
Quadratic Inequality
Polynomial calculators
Binomial Theorem
Binomial Theorem
Square root and nth root calculators
Simplify Radicals
Simplify Radicals
Nth Root
Nth Root
Exponent and logarithm calculators
Exponents
Exponents
Log Calculator
Log Calculator
Number of Digits
Number of Digits
Scientific Notation
Scientific Notation
Sci. Notation Math
Sci. Notation Math
Half-Life
Half-Life
Complex number calculators
Complex Numbers
Complex Numbers
Polar Form
Polar Form
De Moivre
De Moivre
Function and graph calculators
Slope Calculator
Slope Calculator
Linear Function
Linear Function
Direct & Inverse Variation
Direct & Inverse Variation
y = ax² Calculator
y = ax² Calculator
Distance Formula
Distance Formula
3D Distance
3D Distance
Section Formula
Section Formula
Point to Line
Point to Line
Lat/Long Distance
Lat/Long Distance
Complete the Square
Complete the Square
Circle Equation
Circle Equation
Conic Sections
Conic Sections
Polar Coordinates
Polar Coordinates
Sequence calculators
Arithmetic Sequence
Arithmetic Sequence
Geometric Sequence
Geometric Sequence
Fibonacci Sequence
Fibonacci Sequence
Recurrence Relation
Recurrence Relation
Vector calculators
Vector Calculator
Vector Calculator
Cross Product
Cross Product
Matrix calculators
Matrix Calculator
Matrix Calculator
Determinant
Determinant
Inverse Matrix
Inverse Matrix
Plane geometry calculators
Sin Cos Tan
Sin Cos Tan
Degrees ⇔ Radians
Degrees ⇔ Radians
a sin θ + b cos θ
a sin θ + b cos θ
Triangle Solver
Triangle Solver
Triangle Area
Triangle Area
Right Triangle
Right Triangle
Pythagorean Theorem
Pythagorean Theorem
Polygon Angles
Polygon Angles
Scale Factor
Scale Factor
Parallel Lines
Parallel Lines
Rectangle Area
Rectangle Area
Parallelogram Area
Parallelogram Area
Trapezoid Area
Trapezoid Area
Circle Calculator
Circle Calculator
Sector Area
Sector Area
Inscribed Angle
Inscribed Angle
Ellipse Area
Ellipse Area
Solid geometry calculators
Cube Volume
Cube Volume
Cube Surface Area
Cube Surface Area
Box Volume
Box Volume
Box Surface Area
Box Surface Area
Cylinder Volume
Cylinder Volume
Cylinder Surface
Cylinder Surface
Sphere Volume
Sphere Volume
Sphere Surface
Sphere Surface
Spherical Cap Volume
Spherical Cap Volume
Cap Surface Area
Cap Surface Area
Ellipsoid Volume
Ellipsoid Volume
Ellipsoid Surface
Ellipsoid Surface
Pyramid Volume
Pyramid Volume
Pyramid Surface
Pyramid Surface
Cone Volume
Cone Volume
Cone Surface Area
Cone Surface Area
Frustum Volume
Frustum Volume
Frustum Surface Area
Frustum Surface Area
Pipe Volume
Pipe Volume
Capsule Volume
Capsule Volume
Capsule Surface Area
Capsule Surface Area
Date and time calculators
Age Calculator
Age Calculator
Days Between Dates
Days Between Dates
Date Calculator
Date Calculator
Hours From Now
Hours From Now
Day of the Week
Day of the Week
Time Calculator
Time Calculator
Time Zone Converter
Time Zone Converter
Hours Calculator
Hours Calculator
Time Duration
Time Duration
Time Card
Time Card
Finance and economics calculators
Compound Interest
Compound Interest
Simple Interest
Simple Interest
Interest Calculator
Interest Calculator
TVM Calculator
TVM Calculator
Present Value
Present Value
Future Value
Future Value
ROI Calculator
ROI Calculator
IRR Calculator
IRR Calculator
Payback Period
Payback Period
Average Return
Average Return
GDP Calculator
GDP Calculator
Web marketing and ad metric calculators
CTR Calculator
CTR Calculator
Conversion Rate
Conversion Rate
CPC, CPM & CPA
CPC, CPM & CPA
ROAS Calculator
ROAS Calculator
Break-Even CPA
Break-Even CPA
LTV Calculator
LTV Calculator
CAC Calculator
CAC Calculator
Churn Rate
Churn Rate
A/B Test Calc
A/B Test Calc
A/B Sample Size
A/B Sample Size
SEO Traffic
SEO Traffic
Break-Even Point
Break-Even Point
Markup vs. Margin
Markup vs. Margin
CAGR Calculator
CAGR Calculator
Health and fitness calculators
BMI Calculator
BMI Calculator
Sleep Calculator
Sleep Calculator
Calorie Calculator
Calorie Calculator
BMR Calculator
BMR Calculator
TDEE Calculator
TDEE Calculator
Ideal Weight
Ideal Weight
Body Fat Calculator
Body Fat Calculator
Lean Body Mass
Lean Body Mass
Calories Burned
Calories Burned
Protein Intake
Protein Intake
Macro Calculator
Macro Calculator
Carb Calculator
Carb Calculator
Fat Intake
Fat Intake
Child Height
Child Height
Sports calculators
Golf Handicap
Golf Handicap
Pace Calculator
Pace Calculator
1RM Calculator
1RM Calculator
Target Heart Rate
Target Heart Rate
Weather calculators
Heat Index
Heat Index
Wind Chill
Wind Chill
Dew Point
Dew Point
Computer calculators
Base Converter
Base Converter
Subnet Calculator
Subnet Calculator
Download Time
Download Time
Household energy and budget calculators
Electricity Cost
Electricity Cost
kWh to Cost
kWh to Cost
Yearly kWh to Cost
Yearly kWh to Cost
AC Size (BTU)
AC Size (BTU)
AC Running Cost
AC Running Cost
Heating Costs
Heating Costs
Gas vs Electric
Gas vs Electric
LED Savings
LED Savings
Salary Calculator
Salary Calculator
Budget Calculator
Budget Calculator
Car calculators
Trip Gas Cost
Trip Gas Cost
EV Charging Cost
EV Charging Cost
EV vs Gas Cost
EV vs Gas Cost
MPG Calculator
MPG Calculator
Tire Size
Tire Size
Solar power and battery calculators
Solar Output
Solar Output
Solar Panel Count
Solar Panel Count
Solar Payback
Solar Payback
Battery Size
Battery Size
Home and DIY calculators
Tile Calculator
Tile Calculator
Stair Calculator
Stair Calculator
Concrete Volume
Concrete Volume
Wall Area
Wall Area
Wallpaper Rolls
Wallpaper Rolls
Paint Calculator
Paint Calculator
Flooring Needed
Flooring Needed
Exterior Walls
Exterior Walls
Gravel Needed
Gravel Needed
Mortar Mix
Mortar Mix
Slope Grade
Slope Grade
Lumber Cut List
Lumber Cut List
Lot Coverage/FAR
Lot Coverage/FAR
Sheet Vinyl Roll
Sheet Vinyl Roll
Insulation Needed
Insulation Needed
Curtain Size
Curtain Size
TV Size & Distance
TV Size & Distance
Soil Needed
Soil Needed
Sod Needed
Sod Needed
Block Calculator
Block Calculator
Brick Calculator
Brick Calculator
Deck Materials
Deck Materials
Ramp Length
Ramp Length
Pilot Hole Size
Pilot Hole Size
Room Ventilation
Room Ventilation
Paint Thinning
Paint Thinning
Baseboard & Trim
Baseboard & Trim
Blind Size
Blind Size
Picture Hanging
Picture Hanging
Drain Slope
Drain Slope
Screw Calculator
Screw Calculator
Board Feet
Board Feet
Fence Calculator
Fence Calculator
Wood Shrinkage
Wood Shrinkage
Caulk Calculator
Caulk Calculator
Heat Loss
Heat Loss
Furniture Fit
Furniture Fit
Moving Boxes
Moving Boxes
Storage Capacity
Storage Capacity
Plywood Cuts
Plywood Cuts
Shelf Sag
Shelf Sag

Absolute Value Equation and Inequality Calculator (Two Methods with Steps and a Number Line)

Enter the coefficients a and b of the inside, ax + b, the number c on the right, and the type of comparison (=, <, ≤, >, ≥). The expression below is linked to the input fields, so you can also edit the numbers directly in it.

Decimals, negative numbers and fractions such as 3/4 can be used. A blank a is treated as 1 (x means 1x), and a blank b or c is treated as 0.
Result and graph
Enter the coefficients a and b, the number c on the right and the type of comparison in the fields on the left, then press "Calculate". The steps for two methods and a number line will appear here.

What you can do on this page

  • Solve absolute value equations and inequalities, \(|ax+b| = c\), \(< c\), \(\le c\), \(> c\) and \(\ge c\), just by entering the coefficients and choosing the comparison. Answers are shown as fractions in lowest terms (exact values)
  • It shows the steps for both standard methods: (1) the basic rules (such as "if \(|X| = c\), then \(X = \pm c\)") and (2) splitting into cases (\(ax+b \ge 0\) and \(< 0\)) to remove the absolute value. For the cases, it checks each answer against the case condition line by line
  • Tricky cases such as \(c = 0\) and \(c < 0\) (only one point, all real numbers except one point, no solution, all real numbers) are handled correctly, with the reason: "an absolute value is always 0 or more"
  • The solution of an inequality is drawn on a number line, with a closed circle when the endpoint is included and an open circle when it is not
  • Coefficients can be decimals, negative numbers or fractions such as 3/4. A plain-language explanation of the formulas and copy-and-paste formulas for Excel, Google Sheets and Python are all on this page
The right side can only be a number \(c\). Forms with \(x\) on the right side, such as \(|x-1| < 2x\), and expressions with two or more absolute values, such as \(|x-1| + |x-2|\), are not supported (you can still solve them by hand by splitting into cases, as explained in "Formulas and number lines" below).

What is this calculation used for?

Setting the acceptable range for a part (tolerances in manufacturing)

The size of a manufactured part is controlled as "design value ± tolerance". For a part that should be 2.000 inches long with a tolerance of ±0.005 inch, the pass condition is exactly the absolute value inequality \(|x - 2| \le 0.005\), and its solution, \(1.995 \le x \le 2.005\), is the acceptable range.
The notation "\(2.000 \pm 0.005\)" on a drawing is a short way of writing this inequality.

The standard range for household voltage (utilities)

In the United States, household outlets are nominally 120 volts, and the industry standard (ANSI C84.1, Range A) expects the voltage delivered to homes to stay within ±5%, that is, from 114 to 126 volts. This is the range \(|V - 120| \le 6\), or \(114 \le V \le 126\).
Rules that "keep the size of the difference from a standard value within a limit" appear in many fields, such as water pressure and the net contents printed on food packages, and each can be written as an absolute value inequality.

Threshold checks in programs (tolerances and hit detection)

In programming, a check that treats two values as equal when their difference is small enough is written like if abs(x - target) <= eps. It is the standard way to compare decimals while allowing for rounding errors, or to decide in a game that a character has "almost reached" its destination.
This one line is the absolute value inequality \(|x - t| \le \varepsilon\) written as code, and its solution range is exactly the range where the check passes.

Judging the size of a measurement error (science and testing)

The difference between a measured value and the true value (the error) can be on the plus side or the minus side. When the question is "is the size of the error within a limit?", the basic approach is to drop the sign and look at \(|\text{measured value} - \text{reference value}|\).
For example, a thermometer with an accuracy of "±0.2 °F" roughly guarantees \(|\text{reading} - \text{true value}| \le 0.2\). Keeping this range in mind changes how you read the result.

Formulas and number lines

Basic rule for absolute value equations (when \(c > 0\))
On the number line
Standard notation (the usual math form)
\(X\) \(=\) \(c\) \(,\ \ \) \(-c\)
In words (symbols replaced with words)
③ \(X\): inside of the absolute value \(=\) ① \(c\): the positive side \(,\ \ \) ② \(-c\): the negative side
The formula in words
① The absolute value \(|X|\) is the distance from 0 on the number line. The only numbers whose distance from 0 is exactly \(c\) are \(c\): the positive side and
② \(-c\): the negative side
③ So \(X\): inside of the absolute value equals one of these two
Quick example
The solutions of \(|x| = 3\) are the numbers at distance 3 from 0, so
inside \(x\) \(=\) \(3\) \(,\ \ \) \(-3\)
\(x = 3,\ \ x = -3\)
Key idea
For an equation of the form \(|X| = c\), the basic move is to treat the inside \(X\) as one unit and remove the absolute value as \(X = \pm c\). For example, \(|2x - 3| = 5\) splits into two linear equations, \(2x - 3 = 5\) and \(2x - 3 = -5\). This basic rule only works when the right side \(c\) is positive. If \(c = 0\), the only solution is "the one point where the inside is 0"; if \(c\) is negative, there is no solution, because an absolute value cannot be negative (this calculator detects these cases automatically and explains why).
Basic rule for absolute value inequalities (\(<\) and \(\le\): the range between)
On the number line
Standard notation (the usual math form)
\(-c\) \(<\) \(X\) \(<\) \(c\)
In words (symbols replaced with words)
① \(-c\): lower endpoint \(<\) ③ \(X\): inside of the absolute value \(<\) ② \(c\): upper endpoint
The formula in words
① Numbers with \(|X| < c\) (distance from 0 less than \(c\)) lie to the right of \(-c\): lower endpoint
② and to the left of \(c\): upper endpoint
③ So \(X\): inside of the absolute value is in the range between the two endpoints
Quick example
The solution of \(|x| \le 2\) is the range of numbers at distance 2 or less from 0, so
\(-2\) \(\le\) inside \(x\) \(\le\) \(2\)
\(-2 \le x \le 2\)
Key idea
With the equal sign, \(|X| \le c\), the endpoints themselves are also solutions, so it becomes \(-c \le X \le c\). On a number line, an included endpoint is drawn as a closed (filled) circle, and an endpoint that is not included as an open circle. \(-c < X < c\) is a compact way to write "\(-c < X\) and \(X < c\)". Because it is "and", only the overlap of the two conditions is the solution.
Basic rule for absolute value inequalities (\(>\) and \(\ge\): the ranges outside)
On the number line
Standard notation (the usual math form)
\(X\) \(<\) \(-c\) \(\ \text{or}\ \) \(c\) \(<\) \(X\)
In words (symbols replaced with words)
③ \(X\): inside of the absolute value \(<\) ① \(-c\): lower endpoint \(\ \text{or}\ \) ② \(c\): upper endpoint \(<\) \(X\): inside of the absolute value
The formula in words
① Numbers with \(|X| > c\) (distance from 0 greater than \(c\)) lie either further left than \(-c\): lower endpoint
② or further right than \(c\): upper endpoint
③ So \(X\): inside of the absolute value is in one of the two ranges outside the endpoints
Quick example
The solution of \(|x| > 1\) is the numbers at distance more than 1 from 0, so
inside \(x\) \(<\) \(-1\) \(\ \text{or}\ \) \(1\) \(<\) inside \(x\)
\(x < -1 \ \text{or}\ 1 < x\)
Key idea
A handy way to remember it: "less than means between, greater than means outside". The same "between or outside" idea also appears in quadratic inequalities (where the parabola is above or below the \(x\)-axis). In \(x < -1\) or \(1 < x\), the word "or" matters. No single \(x\) can be in both ranges at once, so do not confuse it with "and". (Some textbooks write this as \(x < -1\) or \(x > 1\); it means the same thing.)
Removing the absolute value by splitting into cases (works for any expression)
On a graph
Standard notation (the usual math form)
\(\lvert X \rvert\) \(=\) \(X\) \(\quad (X \ge 0)\)
\(\lvert X \rvert\) \(=\) \(-X\) \(\quad (X < 0)\)
In words (symbols replaced with words)
③ \(|X|\): absolute value \(=\) ① \(X\): as it is \(\quad (X \ge 0)\)
\(|X|\): absolute value \(=\) ② \(-X\): with its sign changed \(\quad (X < 0)\)
The formula in words
① When the inside is 0 or more (\(X \ge 0\)), it comes off as \(X\): as it is
② When the inside is negative (\(X < 0\)), it comes off as \(-X\): with its sign changed
③ So \(|X|\): absolute value can always be removed by splitting into cases by the sign of the inside
Quick example
An example with a negative inside: when \(X = -5\), change the sign to remove the absolute value
\(\lvert -5 \rvert\) \(=\) with its sign changed, \(-(-5)\)
\(\lvert -5 \rvert = -(-5) = 5\)
Key idea
The confusing part is that "you put a minus sign on it, but the result is positive". If \(X\) itself is negative, then \(-X\) is positive (if \(X = -5\), then \(-X = 5\)). After removing the absolute value by cases, always check that each case's answer fits its case condition (\(X \ge 0\) or \(X < 0\), rewritten as a range of \(x\)). Reject any answer that does not fit, then combine the answers of all the cases to get the final answer. Splitting into cases works even for harder expressions where the basic rules do not apply (with \(x\) on the right side, or with two absolute values, for example). In the result area, this calculator shows these case steps and checks as Method 2.
When the right side \(c\) is positive, absolute value equations and inequalities can be turned into linear ones with the basic rules: \(=\) gives \(X = \pm c\), \(<\) gives the range between, \(-c < X < c\), and \(>\) gives the ranges outside, \(X < -c\) or \(c < X\). Even when the basic rules do not apply, splitting into cases by the sign of the inside always removes the absolute value. After splitting into cases, do not forget to check each answer against its case condition and keep only the overlap.

Symbols and terms

Symbols

\(|x|\) absolute value of x The absolute value sign. A number written between two vertical bars means how far it is from 0 on the number line (its distance). A distance is always 0 or more, so \(|5| = 5\) and \(|-5| = 5\).
\(X\) capital X On this page, a letter that stands for the whole inside of the absolute value, \(ax+b\), treated as one unit. Treating the inside as a single letter lets you use the basic rules directly.
\(a,\ b,\ c\) a, b, c Letters often used for fixed numbers (constants). By custom, letters near the start of the alphabet, \(a,\ b,\ c\), are used for fixed numbers. On this page, \(a\) and \(b\) are the coefficient and the constant of the inside, \(ax+b\), and \(c\) is the number on the right side.
\(x\) ex The unknown number you want to find. By custom, letters near the end of the alphabet, \(x,\ y,\ z\), are used for unknowns, a habit said to come from the mathematician Descartes.
\(\pm\) plus or minus A symbol that writes "both the \(+\) case and the \(-\) case" at once. \(X = \pm 5\) is a short way to write both \(X = 5\) and \(X = -5\).
\(<,\ >\) less than, greater than Inequality signs that compare sizes. The open side of the sign faces the larger number. The endpoint itself is not included (shown as an open circle on a number line).
\(\ge,\ \le\) greater than or equal to, less than or equal to Inequality signs that include the endpoint itself (shown as a closed circle on a number line). Some countries, such as Japan, write them with a double line under the sign (≧, ≦); the meaning is the same.
\(\neq\) not equal to The symbol for "is not equal to". \(x \neq 2\) means "every real number except 2", and it shows up in the solution of \(|X| > 0\).

Terms

absolute value The distance from 0 to a number on the number line. A distance is always 0 or more. A positive number stays the same (\(|5| = 5\)), and a negative number loses its sign (\(|-5| = 5\)). Its meaning is taught in Grade 6, and equations and inequalities with it in Algebra 1 and Algebra 2.
equation A statement with an equal sign that contains an unknown number. A value of the unknown that makes it true is a "solution", and finding all the solutions is "solving the equation".
inequality A statement that compares the sizes of numbers or expressions with an inequality sign (\(<\), \(\le\), \(>\), \(\ge\)). Its solution is usually a range rather than a single number, and it is easier to understand on a number line.
linear expression An expression in which \(x\) appears only to the first power, such as \(2x - 3\). On this page, the inside of the absolute value is a linear expression.
splitting into cases (case analysis) When an expression takes a different form depending on the situation, you split the problem into cases and solve each one separately. Absolute value is the classic example, because how you remove it depends on the sign of the inside.
checking against the case condition Making sure that an answer fits the condition it was based on. When you split into cases, always check that each case's answer satisfies that case's condition (for a range, that there is an overlap), and reject any answer that does not.
overlap The part that belongs to both of two ranges (the "and" range, also called the intersection). A common way to find it is to draw the ranges on number lines one above the other and read off where they overlap.
number line A picture that places numbers as points on a straight line. Numbers get larger to the right. It is used to see absolute values (distances from 0) and the solutions of inequalities.
moving a term Moving a term of an equation or inequality to the other side and changing its sign. Moving the \(-3\) in \(2x - 3 = 5\) to the right side gives \(2x = 5 + 3\).
real number Any number that can be placed on the number line: whole numbers, fractions and decimals, and also numbers such as \(\sqrt{2}\) and pi.
no solution There is no \(x\) at all that satisfies the condition. For example, \(|x| = -2\) has no solution, because an absolute value cannot be negative.
all real numbers It is true whatever value \(x\) has. For example, \(|x| \ge -1\) is always true, because an absolute value is always 0 or more.

Good to know before you start

Here is what helps you use the calculation on this page with real understanding, not just by pressing the button.
If you get stuck, going back to review these topics is the fastest way forward.

Negative numbers and the number line (Grades 6–7)
  • Knowing that numbers get larger to the right on the number line
  • Being able to add and subtract with negative numbers, as in \(-3 + 5 = 2\)
  • Knowing that putting a minus sign on a negative number makes it positive, as in \(-(-5) = 5\)
What absolute value means (Grade 6)
  • Knowing that absolute value is "the distance from 0 to the number on the number line" (\(|5| = 5\), \(|-5| = 5\))
  • Being able to explain why an absolute value is always 0 or more (it is a distance)
Linear equations (Grades 7–8)
  • Being able to move a term to the other side (changing its sign)
  • Being able to solve \(2x = 8\) by dividing both sides by 2 to get \(x = 4\)
Linear inequalities (Grade 7 and Algebra 1)
  • Being able to move terms and divide both sides by the same positive number in an inequality too
  • Knowing that multiplying or dividing both sides by a negative number flips the inequality sign (for example, dividing both sides of \(-2x \le 6\) by \(-2\) gives \(x \ge -3\))
  • Being able to picture the difference between "and" (the overlap) and "or" (both ranges together) on a number line
Working with fractions (Grades 5–7)
  • Being able to simplify fractions and add or subtract fractions with different denominators
  • Being comfortable leaving an answer as a fraction such as \(\dfrac{3}{2}\)

How to calculate it in Excel

Copy the whole table below and paste it into cell A1 in Excel. It works as is.
Table to solve |ax+b| = c
Coefficient of x, a 2
Constant b -3
Right side c 5
Solution 1 (x where the inside is c) =(B3-B2)/B1
Solution 2 (x where the inside is −c) =(-B3-B2)/B1
Table to find the solution range of |ax+b| ≤ c
Coefficient of x, a 2
Constant b -3
Right side c 5
Left end of the range =MIN((B3-B2)/B1,(-B3-B2)/B1)
Right end of the range =MAX((B3-B2)/B1,(-B3-B2)/B1)
Table to check a solution by substituting it
Coefficient of x, a 2
Constant b -3
x to check 4
Value of |ax+b| =ABS(B1*B3+B2)
After pasting, the upper rows (the coefficients and the right side) are your inputs and the lower rows are calculated automatically.
The first table is for |2x − 3| = 5, and it gives solution 1 = 4 and solution 2 = −1. If you enter 0 or a negative number for c, it still shows numbers, but the real answer is "only one point if c = 0, no solution if c is negative", so be careful (the calculator on this page detects this automatically).
The second table finds the solution range of |2x − 3| ≤ 5, −1 ≤ x ≤ 4. MIN gives the left end and MAX the right end. For > and ≥, the solution is the two ranges outside these values.
The third table is for checking. Substitute the solution x = 4, and the value of ABS (the absolute value function) comes back to the right side, 5.

How to calculate it in Google Sheets

Copy the whole table below and paste it into cell A1 in Google Sheets. It works as is.
Table to solve |ax+b| = c
Coefficient of x, a 2
Constant b -3
Right side c 5
Solution 1 (x where the inside is c) =(B3-B2)/B1
Solution 2 (x where the inside is −c) =(-B3-B2)/B1
Table to find the solution range of |ax+b| ≤ c
Coefficient of x, a 2
Constant b -3
Right side c 5
Left end of the range =MIN((B3-B2)/B1,(-B3-B2)/B1)
Right end of the range =MAX((B3-B2)/B1,(-B3-B2)/B1)
Table to check a solution by substituting it
Coefficient of x, a 2
Constant b -3
x to check 4
Value of |ax+b| =ABS(B1*B3+B2)
The same formulas as in Excel work as is. Copy the whole table, paste it into cell A1, and replace the coefficients and the right side with your own numbers.

How to calculate it in Python

from fractions import Fraction

# Solve |a*x + b| ? c (a fraction such as 3/4 can be written Fraction(3, 4))
a = Fraction(2)     # coefficient of x
b = Fraction(-3)    # constant (inside the absolute value)
c = Fraction(5)     # number on the right side
sign = "<="         # choose from "=", "<", "<=", ">", ">="

lower = (-c - b) / a    # x where the inside is -c
upper = (c - b) / a     # x where the inside is c
left, right = min(lower, upper), max(lower, upper)

if c > 0:
    if sign == "=":
        print(f"Solution: x = {left}, {right}")
    elif sign in ("<", "<="):
        print(f"Solution: {left} {sign} x {sign} {right}")
    else:
        flipped = "<" if sign == ">" else "<="
        print(f"Solution: x {flipped} {left} or {right} {flipped} x")
elif c == 0:
    boundary = -b / a   # x where the inside is 0
    if sign in ("=", "<="):
        print(f"Solution: x = {boundary}")
    elif sign == "<":
        print("No solution")
    elif sign == ">":
        print(f"Solution: x ≠ {boundary}")
    else:
        print("All real numbers")
else:
    # An absolute value is always 0 or more, so comparing it with a negative c is decided automatically
    if sign in (">", ">="):
        print("All real numbers")
    else:
        print("No solution")
With the fractions module from the standard library, you can calculate with exact fractions and no decimal rounding errors. This example solves |2x − 3| ≤ 5, and running it prints "Solution: -1 <= x <= 4". Change the coefficients and the comparison (sign) and run it.

How to write it in LaTeX and other math languages (copy and paste)

Basic rule for absolute value equations (when \(c > 0\))
|X| = c ⇔ X = ±c (c > 0)
\lvert X \rvert = c \iff X = \pm c \quad (c > 0)
<math xmlns="http://www.w3.org/1998/Math/MathML" display="block">
  <mrow>
    <mo>|</mo><mi>X</mi><mo>|</mo>
    <mo>=</mo><mi>c</mi>
    <mo>&#x21D4;</mo>
    <mi>X</mi><mo>=</mo><mo>&#xB1;</mo><mi>c</mi>
  </mrow>
</math>
abs(X) = c iff X = +-c
Solve[Abs[x] == c, x, Reals]
solve(abs(x) = c, x);
solve(abs(x) == c, x)
|X| = c ⇔ X = ±c (c > 0)
Basic rule for absolute value inequalities (\(<\) and \(\le\): the range between)
|X| < c ⇔ −c < X < c
\lvert X \rvert < c \iff -c < X < c
<math xmlns="http://www.w3.org/1998/Math/MathML" display="block">
  <mrow>
    <mo>|</mo><mi>X</mi><mo>|</mo>
    <mo>&lt;</mo><mi>c</mi>
    <mo>&#x21D4;</mo>
    <mo>&#x2212;</mo><mi>c</mi><mo>&lt;</mo><mi>X</mi><mo>&lt;</mo><mi>c</mi>
  </mrow>
</math>
abs(X) < c iff -c < X < c
Reduce[Abs[x] < c, x, Reals]
solve(abs(x) < c, x);
solve(abs(x) < c, x, 'ReturnConditions', true)
|X| < c ⇔ −c < X < c
Basic rule for absolute value inequalities (\(>\) and \(\ge\): the ranges outside)
|X| > c ⇔ X < −c or c < X
\lvert X \rvert > c \iff X < -c \ \text{or}\ c < X
<math xmlns="http://www.w3.org/1998/Math/MathML" display="block">
  <mrow>
    <mo>|</mo><mi>X</mi><mo>|</mo>
    <mo>&gt;</mo><mi>c</mi>
    <mo>&#x21D4;</mo>
    <mi>X</mi><mo>&lt;</mo><mo>&#x2212;</mo><mi>c</mi>
    <mtext>&#xA0;or&#xA0;</mtext>
    <mi>c</mi><mo>&lt;</mo><mi>X</mi>
  </mrow>
</math>
abs(X) > c iff X < -c or c < X
Reduce[Abs[x] > c, x, Reals]
solve(abs(x) > c, x);
solve(abs(x) > c, x, 'ReturnConditions', true)
|X| > c ⇔ X < −c or c < X
Removing the absolute value by splitting into cases (works for any expression)
|X| = X (X ≥ 0), |X| = −X (X < 0)
\lvert X \rvert = \begin{cases} X & (X \ge 0) \\ -X & (X < 0) \end{cases}
<math xmlns="http://www.w3.org/1998/Math/MathML" display="block">
  <mrow>
    <mo>|</mo><mi>X</mi><mo>|</mo><mo>=</mo>
    <mrow>
      <mo>{</mo>
      <mtable columnalign="left left">
        <mtr>
          <mtd><mi>X</mi></mtd>
          <mtd><mo>(</mo><mi>X</mi><mo>&#x2265;</mo><mn>0</mn><mo>)</mo></mtd>
        </mtr>
        <mtr>
          <mtd><mo>&#x2212;</mo><mi>X</mi></mtd>
          <mtd><mo>(</mo><mi>X</mi><mo>&lt;</mo><mn>0</mn><mo>)</mo></mtd>
        </mtr>
      </mtable>
    </mrow>
  </mrow>
</math>
abs(X) = {(X, (X >= 0)), (-X, (X < 0)):}
Abs[x] == Piecewise[{{x, x >= 0}, {-x, x < 0}}]
abs(x) = piecewise(x >= 0, x, x < 0, -x);
piecewise(x >= 0, x, x < 0, -x)
|X| = X (X ≥ 0), |X| = −X (X < 0)

How to have ChatGPT  do the calculation

You are a calculation assistant for algebra. Do the following calculation by actually running Python code, and base your answer only on the numbers from the execution result (do not answer by mental math or guessing).

Solve the absolute value inequality |2x − 3| ≤ 5.
Show each of the following:
1. The inequality rewritten with the basic rule (in the form −c ≤ 2x−3 ≤ c)
2. The solution range (with endpoints as fractions in lowest terms or whole numbers)
3. Also solve it by splitting into cases (2x−3 ≥ 0 and 2x−3 < 0), show each case's answer and its overlap with the case condition, and confirm that you get the same answer as in 1

In Python, calculate exactly with sympy's solveset (or an equivalent of Reduce using Abs) and fractions, and show the code you used and the execution result.

How to Use
  1. 1
    Enter your numbers
    Type the numbers you want to calculate with into the input fields
  2. 2
    Calculate
    Press the "Calculate" button
  3. 3
    Check the result
    The result appears on the spot. The same page also explains the idea behind the calculation and the formula
  DataChef Features
Easy and Free
Unlimited conversions for free.
No technical knowledge required.
Intuitive and user-friendly operation.
No Registration Required
Available immediately after access.
Can be used without registering personal information.
Safe and Secure
Fully SSL encrypted communication.
Automatic file deletion by clicking "download".
Fast
High-speed site access
and rapid file conversion.
No Watermark
No watermark.
No attribution required.
Commercial Use Available
Free for commercial use.
No need to contact us for commercial use permission.