Linear Equation Calculator

Linear Equation Calculator

Solve for x with exact fractions, find the equation of a line, solve two equations at once and see it all on a graph.

Type 3x or 3*x for multiply, / for divide and ^ for powers of numbers. Square brackets work like round ones. Every answer is kept as an exact fraction, then checked by substitution.

Solution
x = 8

The graph plots each side or each line, with crossing points and intercepts marked. Values on the graph are rounded; the working above is exact.

This linear equation calculator solves any linear equation in one unknown for UK GCSE and A level students, parents and teachers, and shows every step with exact fractions. It also handles the other kinds of linear equation you meet at school: it finds the equation of a straight line from two points or from a gradient and a point, builds parallel and perpendicular lines, solves a pair of simultaneous equations by elimination and plots the result on a graph. Each mode follows the same methods taught in UK classrooms, so the working matches what your teacher expects to see.

Quick answer: to solve ax + b = cx + d, collect the letter terms on one side and the numbers on the other, then divide, so x = (d − b) ÷ (a − c). For 3(x − 2) + 5 = 2x + 7, the linear equation calculator expands to 3x − 1 = 2x + 7 and finds x = 8, which checks because both sides equal 23.

Linear equation calculator solving 3(x-2)+5=2x+7 with numbered steps, a check and a graph
How the Linear Equation Calculator works: equation in, exact answer, steps, check and graph out.

What Is a Linear Equation Calculator?

A linear equation calculator is a tool that finds the value of the unknown in an equation where the letter is only ever raised to the power 1, and shows the working that gets you there. Equations like 5x − 7 = 3x + 9 or (x + 1) ÷ 4 = (2x − 3) ÷ 3 are linear; anything with x², x³ or a letter on the bottom of a fraction is not, and the calculator tells you so rather than guessing.

In words, the formula is: take the number terms away from the letter terms, then divide by what is left in front of the letter. Written out, ax + b = cx + d gives x = (d − b) ÷ (a − c), as long as a and c are different. Every linear equation in two letters, such as y = 2x + 3, draws a straight line, which is where the name comes from.

How Do You Solve a Linear Equation?

You solve a linear equation by doing the same thing to both sides until the letter is on its own: expand any brackets, clear fractions, gather the letter terms on one side, gather the numbers on the other and divide. Then substitute your answer back in to check it.

Worked example (Amira's homework question): solve 3(x − 2) + 5 = 2x + 7.

  1. Expand the bracket and collect like terms: 3x − 6 + 5 = 2x + 7, so 3x − 1 = 2x + 7.
  2. Subtract 2x from both sides: x − 1 = 7.
  3. Add 1 to both sides: x = 8.
  4. Check: the left side is 3(8 − 2) + 5 = 23 and the right side is 2 × 8 + 7 = 23, so the answer is correct.

Fractions need one extra step. For x/3 + 1/2 = 5/6, multiply every term by 6, the lowest common multiple of the denominators, to get 2x + 3 = 5, so 2x = 2 and x = 1. Decimals work the same way: 0.4(y + 10) = 2y − 4 becomes 2y + 20 = 10y − 20 after multiplying by 5, which gives 40 = 8y and y = 5.

How to Use the Linear Equation Calculator

Step 1: Choose What You Want to Do

Pick a mode at the top: Solve for x, 2 equations (simultaneous equations), Two points, Gradient + point, or Parallel or perpendicular. The inputs change to match, and a fresh set of example buttons appears for that mode.

Step 1: choose solve for x, simultaneous equations or a straight line mode

Step 2: Type Your Equation or Values

Type the equation as you would write it: 3(x-2)+5=2x+7, x/3+1/2=5/6 or 2[3x - (x-1)] = 10 all work. You can use any letter, write 3x or 3*x, and enter point values as whole numbers, decimals or fractions such as -3/4. Tap an example if you want to see how a question type is set out.

Step 2: type the equation or tap an example

Step 3: Read the Answer, Steps and Check

The linear equation calculator gives the answer as an exact fraction, with a decimal and mixed number where they help. Below it, numbered steps show each operation applied to both sides, and a green check box substitutes the answer back into the original equation. If there is no solution, or every value works, the box explains why.

Step 3: read the exact answer, numbered steps and substitution check

Step 4: Use the Graph and the Forms Table

The graph draws each side of a one letter equation as its own line, so the solution is where they cross. In the line modes it plots the line, marks your points and the intercepts, and a table lists the gradient, slope-intercept, point-slope, standard and general forms side by side.

Step 4: see both sides plotted with the crossing point marked

Forms of the Equation of a Straight Line

The same line can be written in several ways. The table uses the line through (1, 3) and (4, 5), which has gradient 2/3, so you can see how each form describes exactly the same set of points.

FormShapeExample lineBest used for
Slope-intercepty = mx + cy = (2/3)x + 7/3Reading the gradient and y-intercept, GCSE graph questions
Point-slopey − y₁ = m(x − x₁)y − 3 = (2/3)(x − 1)Writing a line from one point and a gradient
StandardAx + By = C2x − 3y = −7Whole number coefficients and simultaneous equations
GeneralAx + By + C = 02x − 3y + 7 = 0A level coordinate geometry and exam answers that ask for "= 0"
Vertical linex = kx = 2Lines with an undefined gradient

How Do You Solve Simultaneous Equations by Elimination?

To solve simultaneous equations by elimination, multiply one or both equations so one letter has the same size coefficient, then add or subtract to remove it, solve for the other letter and substitute back. Take 3x + 2y = 16 and 2x − 5y = −2: multiply the first by 2 and the second by 3 to get 6x + 4y = 32 and 6x − 15y = −6.

Subtracting gives 19y = 38, so y = 2, and then 3x + 4 = 16 gives x = 4. On a graph that is the point (4, 2) where the two lines cross. When the letters cancel completely you get either a false statement, meaning the system of linear equations has no solution because the lines are parallel, or 0 = 0, meaning both equations describe the same line with infinitely many solutions.

When Does a Linear Equation Have No Solution?

A linear equation has no solution when the letter terms cancel and leave a false statement, such as 4x + 1 = 4x − 3, which reduces to 1 = −3. Both sides are parallel lines with gradient 4, so they never meet. The opposite case is an identity: 2(x + 3) = 2x + 6 reduces to 6 = 6, which is true for every value of x, so there are infinitely many solutions. The linear equation calculator spots both cases and draws the two sides so you can see why.

How Do You Find a Parallel or Perpendicular Line?

Parallel lines have the same gradient, and perpendicular gradients multiply to −1, so you flip the gradient and change its sign. For the line perpendicular to y = 2x + 3 through (4, 1), the new gradient is −1/2, then c = 1 − (−1/2 × 4) = 3, giving y = −x/2 + 3, or x + 2y = 6 in standard form.

Solving linear equations and finding parallel lines sit on both tiers of the Department for Education GCSE maths subject content, while perpendicular lines are Higher tier only, so check which tier you are sitting before you practise them. Content reviewed October 2026.

Common Mistakes and Tips

  • A minus sign in front of a bracket changes every sign inside it: 6 − (2 − x) becomes 6 − 2 + x.
  • When you clear fractions, multiply every term on both sides, including whole numbers.
  • Keep the letter on the side with the bigger coefficient to avoid dividing by a negative.
  • Always substitute your answer back into the original equation, not a later line of working.

Exact answers such as x = 16/3 are often what an exam wants, but if you need a decimal the fraction to decimal converter turns any fraction into a decimal and back again in one step.

Proportion questions such as 3 : 5 = x : 20 are quicker with the ratio calculator, which shows each scaling step, and every tool in our maths calculators collection keeps the working visible in the same way, so you can move between topics without changing how you check your answers.

</>Embed this calculator on your website

Add the free Linear Equation Calculator to your own site or blog. Copy the code below and paste it into an HTML block. It resizes itself and works on phones.

How we checked this tool: the Tools Veria Editorial Team built this tool by hand, checked it against the official rules or published standards where they apply, and tested it against worked examples. Results are estimates for planning, not personal financial or tax advice. Read our editorial policy and disclaimer, or report an error.

Frequently Asked Questions

What is a linear equation?

A linear equation is an equation where every letter is raised only to the power 1, such as 3x + 5 = 20. It has at most one solution in one unknown, and with two letters, such as y = 2x + 3, its graph is a straight line.

How do I solve a linear equation with fractions?

Multiply every term on both sides by the lowest common multiple of the denominators, then solve as normal. For x/3 + 1/2 = 5/6, multiplying by 6 gives 2x + 3 = 5, so 2x = 2 and x = 1.

Can a linear equation have no solution?

Yes. If the letter terms cancel and leave a false statement, such as 4x + 1 = 4x − 3 giving 1 = −3, there is no solution. If they leave a true statement like 6 = 6, every value works and there are infinitely many solutions.

What is the difference between y = mx + c and standard form?

Both describe the same straight line. y = mx + c shows the gradient m and y-intercept c directly, while standard form Ax + By = C uses whole numbers, for example y = (2/3)x + 7/3 becomes 2x − 3y = −7.

How do I solve simultaneous equations by elimination?

Multiply the equations so one letter has matching coefficients, add or subtract to remove it, solve for the other letter, then substitute back. For 2x + 3y = 12 and x − y = 1, the answer is x = 3 and y = 2.

How do I find a perpendicular gradient?

Take the negative reciprocal: flip the fraction and change the sign, because perpendicular gradients multiply to −1. A line with gradient 2 has a perpendicular gradient of −1/2, and a gradient of −3/4 gives 4/3.