Skip to content
Contania

Linear Equation Calculator

A linear (first-degree) equation has x to the first power and one solution. Enter the coefficients of ax + b = cx + d and the calculator isolates x and shows each step.

Your numbers

Result

x
2
Solution
One solution
Solving step by step
StepDetail
Equation2x + 3 = 0x + 7
Move x terms together(2 - 0)x = 7 - 3
x = (d - b) / (a - c)x = 2
Advertisement

How to solve for x

Gather the x terms on one side and the numbers on the other: from ax + b = cx + d, subtract to get (a - c)x = d - b, then divide: x = (d - b) / (a - c). For 2x + 3 = 7 (a=2, b=3, c=0, d=7): x = (7 - 3) / 2 = 2.

No solution or every solution

If the x coefficients are equal (a = c), there is no x left to solve. If the constants also match, every value of x works (an identity); if they differ, no value works. The calculator flags both cases.

Frequently asked questions

Sources

  • Algebra — solving linear equations

Embed this calculator

Copy the code and paste it into your site or blog. Credit with a link back to Contania is included, and the height adjusts itself.

<iframe src="https://contania.app/embed/math/linear-equation" title="Linear Equation Calculator (ax + b = cx + d)" width="100%" height="720" loading="lazy" style="border:1px solid #e5e0d8;border-radius:12px;max-width:640px"></iframe>
<script>window.addEventListener("message",function(e){if(e.data&&e.data.type==="contania:embed-height"){var f=document.querySelector('iframe[src="https://contania.app/embed/math/linear-equation"]');if(f){f.style.height=e.data.height+"px"}}});</script>

Related calculators