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

Linear Equation Calculator (Solve for x with Steps)

Enter the coefficients of the linear equation ax + b = cx + d. The equation below is linked to the input fields, so you can also edit the coefficients directly in it.

Decimals, negative numbers and fractions such as 3/4 can be used. A blank coefficient of x (a or c) is treated as 1 (x means 1x), and a blank constant term (b or d) is treated as 0. Enter 0 for any term you do not use.
Result and graph
Enter the coefficients in the fields on the left and press "Calculate". The steps and a graph of the two lines will appear here.

What you can do on this page

  • Solve a linear equation of the form \(ax + b = cx + d\) just by entering the coefficients, with step-by-step work
  • The solution is shown both as a fraction in lowest terms such as \(\dfrac{2}{3}\) (the exact value) and as a decimal. A check is shown too: the solution is substituted back to confirm that both sides are equal
  • When both sides have the same coefficient of \(x\), it tells you whether there is "no solution" or "all real numbers" (infinitely many solutions), and why
  • The calculator shows the equation as you would write it by hand, and you can edit the coefficients right in it
  • Coefficients can be decimals, negative numbers or fractions such as 3/4
  • The result also graphs the two lines \(y = \) (left side) and \(y = \) (right side), so you can see that the \(x\)-coordinate of the intersection is the solution
This page solves linear equations in one variable, x. For systems of equations with two variables, or quadratic equations with x², please use the related pages.

What is this calculation used for?

Comparing phone and subscription plans (the break-even point)

"Plan A has a higher base fee but a lower unit price, and Plan B has a lower base fee but a higher unit price." The point where one becomes cheaper than the other is a linear equation of the form \(ax + b = cx + d\). For example, compare a plan at $30 a month plus $3 per GB with a plan at $15 a month plus $6 per GB. Solving \(3x + 30 = 6x + 15\) gives \(x = 5\) (GB). If you use more than 5 GB a month, the first plan is cheaper.
Electricity plans, gym memberships, and buying outright versus subscribing all work the same way: any comparison of "fixed cost + unit price × amount" is this calculation.

When will they catch up? (a speed problem)

When someone chases a person who left earlier, "how many minutes until they catch up" is a linear equation: find the time when both have gone the same distance. For example, a boy leaves home walking at 250 feet per minute, and 9 minutes later his sister follows on a bike at 1,000 feet per minute. \(t\) minutes after the sister leaves, the boy has gone \(250t + 2250\) feet and the sister \(1000t\) feet. Solving \(250t + 2250 = 1000t\) gives \(t = 3\), so she catches up in 3 minutes.
It is a classic algebra word problem, and it is also the same idea as estimating when two travelers or two deliveries will meet.

Finding the break-even point (business)

Shops and factories use a linear equation to find "how many units we must sell to make a profit" (the break-even point). For example, a product sells for $8, its materials cost $3 per unit, and fixed costs such as rent are $6,000 a month. The number of units where revenue equals cost comes from solving \(8x = 3x + 6000\), which gives \(x = 1200\) units. Selling 1,200 units a month is the line between profit and loss.
When planning a new business or product, this is one of the first numbers people check.

Converting temperatures backward (Fahrenheit and Celsius)

A Fahrenheit temperature can be written from the Celsius temperature \(C\) as "Fahrenheit = \(1.8C + 32\)". Finding "what is 86 °F in Celsius?" is the same as solving the linear equation \(1.8C + 32 = 86\). Move the 32 to get \(1.8C = 54\), then divide both sides by 1.8 to get \(C = 30\) degrees.
Whenever you know the conversion formula but want to go the other way (unit conversions, working back from a bill, and so on), you are solving a linear equation.

When will the savings be equal? (allowance and saving plans)

A linear equation also tells you when two people's savings will be the same, if they start with different amounts and save different amounts each month. For example, a younger brother has $50 now and saves $15 a month, and his older brother has $200 now and saves $5 a month. Solving \(15m + 50 = 5m + 200\) gives \(m = 15\), so they will be equal in 15 months.
"When will two amounts that grow at different rates be equal?" Saving plans and goal planning are everyday uses of this equation.

Formulas and graphs

Solution of a linear equation (how to find \(x\))
Graph
Standard notation (the usual math form)
\(x\) \(=\) \((\) \(d - b\) \()\) \(\div\) \((\) \(a - c\) \()\)
In words (symbols replaced with words)
③ \(x\): solution \(=\) \((\) ① \(d - b\): difference of the constants \()\) \(\div\) \((\) ② \(a - c\): difference of the \(x\) coefficients \()\)
The formula in words
① Take \(d - b\): difference of the constants which is left on the right side after moving terms and simplifying,
② divide it by \(a - c\): difference of the \(x\) coefficients which is left on the left side,
③ and you get \(x\): solution (if the difference of the \(x\) coefficients is 0, you cannot divide; see "When there is no single solution" below)
Quick example
The solution of the linear equation \(2x + 3 = 5\) (a = 2, b = 3, c = 0, d = 5) is
\(x\): solution \(=\) \((\) difference of the constants (5 − 3 = 2) \()\) \(\div\) \((\) difference of the x coefficients (2 − 0 = 2) \()\)
\(2x + 3 = 5\)
\(2x = 5 - 3\)
\(2x = 2\)
\(x = \dfrac{2}{2} = 1\)
Key idea
This formula packs the three steps of solving into one answer: (1) move terms to the other side, (2) simplify, (3) divide by the coefficient of \(x\). When you solve by hand, (1) move the \(x\) terms to the left side and the number terms to the right side, (2) simplify each side to get the form \((a - c)x = d - b\), and (3) divide both sides by the coefficient of \(x\), \(a - c\). Why a term changes its sign when it moves to the other side is explained in the next card, "Transposing".
Transposing (why the sign changes)
Standard notation (the usual math form)
\(x\) \(+\) \(b\) \(=\) \(d\)
\(x\) \(=\) \(d\) \(-\) \(b\)
In words (symbols replaced with words)
\(x\): the unknown \(+\) ① \(b\): number to move \(=\) \(d\): number on the right
③ \(x\): the unknown \(=\) \(d\): number on the right \(-\) ② \(b\): number to move
The formula in words
① To get rid of \(b\): number to move on the left side, subtract the same number \(b\) from both sides (subtracting the same number from both sides keeps the equation true).
② On the right side, \(b\): number to move now appears with a minus sign (\(-b\)),
③ and only \(x\): the unknown is left on the left side. It looks as if \(+b\) moved to the right side and changed its sign. This is transposing
Quick example
Moving the \(+3\) on the left side of \(x + 3 = 5\) to the other side gives
\(x\): the unknown \(=\) number on the right (5) \(-\) number moved (3)
\(x + 3 = 5\)
\(x + 3 - 3 = 5 - 3\)
\(x = 5 - 3 = 2\)
Key idea
Transposing is not magic. It is a shortcut for the properties of equality: "add or subtract the same number on both sides". Just as a balance scale stays level when you remove the same weight from both pans, an equation stays true when you subtract the same number from both sides. After subtracting, the term disappears from one side and a term with the opposite sign appears on the other side. Transposing writes these two moves as one. The \(x\) terms can be moved in the same way. For example, moving the \(x\) on the right side of \(3x + 2 = x + 10\) to the left side means subtracting \(x\) from both sides, which gives \(3x - x + 2 = 10\).
When there is no single solution (the difference of the \(x\) coefficients is 0)
Graph
Standard notation (the usual math form)
\((a - c)\,x\) \(=\) \(d - b\)
In words (symbols replaced with words)
① \((a - c)\,x\): difference of the \(x\) coefficients times \(x\) \(=\) ② \(d - b\): difference of the constants
The formula in words
① After moving terms and simplifying, the left side becomes \((a - c)\,x\): difference of the \(x\) coefficients times \(x\) and
② the right side becomes \(d - b\): difference of the constants (when \(a - c = 0\), the left side is \(0 \times x\), and you cannot divide both sides by \(a - c\))
Quick example
Simplifying \(2x + 1 = 2x + 5\) (both sides have the same coefficient of \(x\)) gives
difference of the x coefficients (0) times x \(=\) difference of the constants (5 − 1 = 4)
\(2x - 2x = 5 - 1\)
\(0 \times x = 4\)
Key idea
When \(a - c = 0\), that is, when both sides have the same coefficient of \(x\), the \(x\) terms cancel out when you move them, and you get \(0 \times x = d - b\). The answer then depends on the difference of the constants, \(d - b\). - When \(d - b \neq 0\) (example: \(2x + 1 = 2x + 5\)): any number times 0 is still 0, never a nonzero number. No \(x\) makes the equation true, so there is "no solution". - When \(d - b = 0\) (example: \(2x + 1 = 2x + 1\)): the equation becomes \(0 = 0\), which is true whatever number you put in for \(x\). The solution is "all real numbers" (infinitely many solutions), because both sides are exactly the same expression (an identity). On a graph, "no solution" is two parallel lines (they never meet), and "all real numbers" is two lines lying exactly on top of each other (they meet everywhere).
To solve the linear equation \(ax + b = cx + d\): (1) move the \(x\) terms to the left side and the number terms to the right side (a term that moves changes its sign), (2) simplify to the form \((a - c)x = d - b\), and (3) divide both sides by the coefficient of \(x\), \(a - c\), to get \(x = \dfrac{d - b}{a - c}\). Only when \(a - c = 0\) can you not divide. Then, if the difference of the constants is 0, the answer is "all real numbers", and if not, there is "no solution".

Symbols and terms

Symbols

\(x\) ex The letter for the number you want to find (the unknown). Think of it as "a box for a number we do not know yet". Solving an equation means finding the number that goes in \(x\). Using letters near the end of the alphabet, such as \(x,\ y,\ z\), for unknowns is said to have started with the mathematician Descartes.
\(a,\ c\) a, c The coefficients of \(x\) (the numbers in front of \(x\)). On this page, \(a\) is the coefficient of \(x\) on the left side and \(c\) is the one on the right side. By custom, letters near the start of the alphabet, \(a,\ b,\ c\), stand for fixed numbers.
\(b,\ d\) b, d The constant terms (the number-only terms). On this page, \(b\) is the constant term on the left side and \(d\) is the one on the right side.
\(=\) equals The equal sign. It shows that the left side and the right side are equal. The 16th-century mathematician Robert Recorde is said to have introduced it, because "no two things can be more equal" than two parallel lines. When you rewrite an equation, the most important thing is to keep this "equal" relation.
\(0 \times x\) zero times x The form you get when you simplify an equation whose two sides have the same coefficient of \(x\). Its value is 0 whatever number \(x\) is, so if the right side is 0 it is "true for every \(x\)", and otherwise it is "true for no \(x\)".

Terms

equation Two expressions joined by the equal sign "=". It states that the left side and the right side are equal.
equation with an unknown An equation that is true only when a certain number is put in for the letter (the unknown). For example, \(x + 3 = 5\) is true only when \(x = 2\).
linear equation An equation in which the unknown appears only to the first power (\(x\)), with no terms such as \(x^2\). It can always be written in the form \(ax + b = cx + d\). Taught in Grades 7–8.
solution A value of the unknown that makes the equation true. To "solve" an equation means to find all of its solutions.
left side The expression to the left of the equal sign. Together with the right side, they are called "both sides".
right side The expression to the right of the equal sign. Together with the left side, they are called "both sides".
transposing (moving a term) Moving a term of an equation to the other side and changing its sign. It is a one-step way of writing the property "add or subtract the same number on both sides".
properties of equality The rules that an equation stays true when you add, subtract or multiply both sides by the same number, or divide both sides by the same nonzero number. Every step in solving an equation is based on these properties.
term Each piece of an expression separated by plus or minus signs. \(3x + 2\) has two terms, \(3x\) and \(2\).
coefficient The number in front of a letter. In \(3x\), the coefficient is 3. When no number is written, as in \(x\), the coefficient is 1.
constant term A number-only term with no letter, such as the 2 in \(3x + 2\). It is called constant because it does not change whatever value \(x\) has.
unknown A number whose value we do not know yet and want to find. In equations it is usually written as \(x\). It is also called the variable.
like terms Terms with the same letter part. \(3x\) and \(-x\) are like terms, and they can be combined into one term, \(2x\), by working out the coefficients.
identity An equation that is true whatever number is put in for the letter. For example, \(2x + 1 = 2x + 1\) is an identity, and solving it gives "all real numbers".
check Substituting the solution back into the original equation to make sure both sides really are equal. It catches sign mistakes made when moving terms or dividing.

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.

Positive and negative numbers (Grade 7)
  • Being able to add and subtract with negative numbers (for example, \(9 - 5 = 4\) and \(3 - 5 = -2\))
  • Knowing the sign rules for multiplying and dividing with negative numbers (for example, \(4 \div (-2) = -2\))
Algebraic expressions (Grades 6–7)
  • Reading \(3x\) as "\(3 \times x\)", with 3 as the coefficient of \(x\)
  • Being able to combine like terms (for example, \(3x - x = 2x\))
  • Knowing that \(x\) alone has a coefficient of 1 (it means \(1x\))
What the equal sign means (elementary school to Grade 7)
  • Knowing that the equal sign "=" states that the left side and the right side are equal (it is not just "the sign before the answer")
  • Being able to picture a balance scale that stays level when you do the same thing to both sides
Working with fractions (Grades 5–7)
  • Being able to simplify fractions (for example, \(\dfrac{14}{2} = 7\) and \(\dfrac{4}{6} = \dfrac{2}{3}\))
  • Knowing that dividing by a fraction is the same as multiplying by its reciprocal
  • Being comfortable leaving an answer as a fraction (there is no need to force \(\dfrac{2}{3}\) into a decimal)

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 the linear equation ax+b=cx+d
Coefficient of x on the left, a 3
Constant on the left, b 2
Coefficient of x on the right, c 1
Constant on the right, d 10
Difference of x coefficients a−c =B1-B3
Difference of constants d−b =B4-B2
Solution x = (d−b) ÷ (a−c) =B6/B5
Table to check transposing (the form x + b = d)
Number to move b 3
Number on the right d 5
Solution x = d − b =B2-B1
Table to check whether there is a single solution
Coefficient of x on the left, a 2
Constant on the left, b 3
Coefficient of x on the right, c 2
Constant on the right, d 5
Difference of x coefficients a−c =B1-B3
Difference of constants d−b =B4-B2
Result =IF(B5<>0,"One solution",IF(B6=0,"All real numbers (infinitely many solutions)","No solution"))
After pasting, the upper rows (the coefficients) are your inputs and the lower rows are calculated automatically.
The first table solves 3x + 2 = x + 10, and the solution is (10 − 2) ÷ (3 − 1) = 4. Replace the coefficients with the numbers from your own equation.
The second table checks transposing for x + 3 = 5, and the solution is 5 − 3 = 2.
The third table is for 2x + 3 = 2x + 5. The difference of the x coefficients is 0 and the difference of the constants is 2, so the result is "No solution".

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 the linear equation ax+b=cx+d
Coefficient of x on the left, a 3
Constant on the left, b 2
Coefficient of x on the right, c 1
Constant on the right, d 10
Difference of x coefficients a−c =B1-B3
Difference of constants d−b =B4-B2
Solution x = (d−b) ÷ (a−c) =B6/B5
Table to check transposing (the form x + b = d)
Number to move b 3
Number on the right d 5
Solution x = d − b =B2-B1
Table to check whether there is a single solution
Coefficient of x on the left, a 2
Constant on the left, b 3
Coefficient of x on the right, c 2
Constant on the right, d 5
Difference of x coefficients a−c =B1-B3
Difference of constants d−b =B4-B2
Result =IF(B5<>0,"One solution",IF(B6=0,"All real numbers (infinitely many solutions)","No solution"))
The same formulas as in Excel work as is. Copy the whole table, paste it into cell A1, and replace the coefficients with the numbers from your own equation.

How to calculate it in Python

from fractions import Fraction

# Coefficients of ax + b = cx + d (a fraction such as 3/4 can be written Fraction(3, 4))
left_x_coef = Fraction(3)     # coefficient of x on the left, a
left_const = Fraction(2)      # constant on the left, b
right_x_coef = Fraction(1)    # coefficient of x on the right, c
right_const = Fraction(10)    # constant on the right, d

# After moving terms and simplifying: (a−c)x = d−b
coef_diff = left_x_coef - right_x_coef
const_diff = right_const - left_const

if coef_diff != 0:
    solution = const_diff / coef_diff
    print(f"Solution (fraction): x = {solution}")
    print(f"Solution (decimal): x = {float(solution)}")
elif const_diff == 0:
    print("All real numbers (infinitely many solutions)")
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 3x + 2 = x + 10, and running it prints "x = 4". Change the coefficients and run it (when the solution does not divide evenly, it is shown as a fraction such as 2/3).

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

Solution of a linear equation (how to find \(x\))
x = (d − b)/(a − c)
x = \frac{d - b}{a - c}
<math xmlns="http://www.w3.org/1998/Math/MathML" display="block">
  <mrow>
    <mi>x</mi>
    <mo>=</mo>
    <mfrac>
      <mrow><mi>d</mi><mo>&#x2212;</mo><mi>b</mi></mrow>
      <mrow><mi>a</mi><mo>&#x2212;</mo><mi>c</mi></mrow>
    </mfrac>
  </mrow>
</math>
x = (d - b)/(a - c)
Solve[a x + b == c x + d, x]
solve(a*x + b = c*x + d, x);
solve(a*x + b == c*x + d, x)
x = (d − b)/(a − c)
Transposing (why the sign changes)
x + b = d ⇔ x = d − b
x + b = d \iff x = d - b
<math xmlns="http://www.w3.org/1998/Math/MathML" display="block">
  <mrow>
    <mi>x</mi><mo>+</mo><mi>b</mi><mo>=</mo><mi>d</mi>
    <mo>&#x21D4;</mo>
    <mi>x</mi><mo>=</mo><mi>d</mi><mo>&#x2212;</mo><mi>b</mi>
  </mrow>
</math>
x + b = d <=> x = d - b
Solve[x + b == d, x]
solve(x + b = d, x);
solve(x + b == d, x)
x + b = d ⇔ x = d − b
When there is no single solution (the difference of the \(x\) coefficients is 0)
(a − c)x = d − b
(a - c)x = d - b
<math xmlns="http://www.w3.org/1998/Math/MathML" display="block">
  <mrow>
    <mo>(</mo><mi>a</mi><mo>&#x2212;</mo><mi>c</mi><mo>)</mo>
    <mi>x</mi>
    <mo>=</mo>
    <mi>d</mi><mo>&#x2212;</mo><mi>b</mi>
  </mrow>
</math>
(a - c)x = d - b
Reduce[a x + b == c x + d, x]
solve(a*x + b = c*x + d, x);
solve(a*x + b == c*x + d, x)
(a − c)x = d − b

How to have ChatGPT  do the calculation

You are a calculation assistant for middle school math (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 linear equation 3x + 2 = x + 10.
Show each of the following:
1. The step of moving terms (the equation with the x terms moved to the left side and the number terms moved to the right side)
2. The simplified equation (in the form (a−c)x = d−b)
3. The solution x (if it does not divide evenly, give both a fraction in lowest terms and a decimal)
4. A check (substitute the solution and confirm that both sides are equal)

In Python, calculate exactly with the fractions module from the standard library, and show the formulas you used and the numbers from 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.