We use cookies.This website uses essential cookies to operate core features. With your consent, we also use analytics cookies to understand traffic and improve the service. For more details, see our .
If this tool helped you, you can buy us a coffee ☕
Enter two linear equations to instantly solve for x and y. Free online calculator with step-by-step solutions.
Please enter all coefficients for both equations to see the solution.
Students doing homework: When middle school students encounter classic word problems (like distance/rate/time or mixture problems), they can set up the two equations and use this calculator to verify their answers.
Parents tutoring children: Forgot how to solve them? Just enter the coefficients to instantly see the values of x and y, and use the step-by-step breakdown to explain the process.
Design and budgeting work: For example, if a lighting plan must meet two constraints (total power and total illuminance), you can set them up as a system of two linear equations for a quick solution.
The standard form of a system of two linear equations is:
① a₁x + b₁y = c₁
② a₂x + b₂y = c₂
Our calculator automatically solves these using Cramer's Rule or the Substitution Method. The core mathematical intuition: think of the two equations as two lines on a plane; the solution is their point of intersection. If the coefficient determinant D = a₁·b₂ – a₂·b₁ is not equal to 0, there is a unique solution:
x = Dₓ / D , where Dₓ = c₁·b₂ – c₂·b₁
y = Dᵧ / D , where Dᵧ = a₁·c₂ – a₂·c₁
Example: John bought 2 notebooks and 3 pens for $8, while Mary bought 4 notebooks and 1 pen for $2. Let x be the price of a notebook and y be the price of a pen. The system of equations is:
2x + 3y = 8 ①
4x – y = 2 ②
Instructions:
In the first row of the calculator, enter a1=2, b1=3, c1=8. In the second row, enter a2=4, b2=-1, c2=2 (note: use "-" for negative numbers). Click solve.
Intermediate Calculations (done automatically by the calculator):
Coefficient determinant D = 2×(-1) - 4×3 = -2 - 12 = -14
Dₓ = 8×(-1) - 2×3 = -8 - 6 = -14 → x = Dₓ/D = (-14)/(-14) = 1
Dᵧ = 2×2 - 4×8 = 4 - 32 = -28 → y = Dᵧ/D = (-28)/(-14) = 2
Result: The calculator displays x = 1, y = 2. This means a notebook costs $1 and a pen costs $2. You can use this result to verify the original problem: 2×1 + 3×2 = 2 + 6 = 8 ✓, and 4×1 - 2 = 4 - 2 = 2 ✓.
Comparison Example 1 (No Solution): The system x + y = 3 and 2x + 2y = 7.
Enter a1=1, b1=1, c1=3; a2=2, b2=2, c2=7 into the calculator. The calculator will prompt "No solution". This is because the two equations represent parallel lines with no point of intersection.
Comparison Example 2 (Infinite Solutions): The system x + y = 3 and 2x + 2y = 6.
The coefficients are proportional, so the calculator will prompt "Infinite solutions", indicating that the two equations represent the exact same line.
Comparison Example 3 (Decimal Solutions): The system 0.5x + 1.2y = 3.6 and 2.1x - 0.8y = 1.4.
The calculator supports decimal inputs, yielding x ≈ 1.466, y ≈ 2.389. Note the decimal places; the result is rounded to three decimal places.
The calculator outputs specific values for x and y, representing the two unknowns. You should refer back to the original word problem to check if the units and signs make sense in context (e.g., the number of people cannot be negative). If it's a practice problem, substitute the solutions back into the original equations to verify. If the solution is a decimal or fraction, note whether the problem requires a fractional format—our calculator defaults to decimal output, but the exact fractional form is shown in the "Show steps" section.
Precision limits: The calculator uses JavaScript floating-point arithmetic. For edge cases that are very close to having no solution or infinite solutions (e.g., coefficients that are almost proportional), rounding errors might incorrectly yield a solution or an error prompt. We recommend entering integers or finite decimals and avoiding extremely large coefficients.
Inapplicable scenarios: This tool cannot solve non-linear systems of equations, such as those containing x² or sin(x), nor can it solve inequalities. It is strictly for standard systems of two linear equations.
Educational use disclaimer: Results are for reference only. For exams or critical decisions, please verify manually. The calculator's steps are provided for learning purposes and may differ from the specific solving sequence required by your teacher.
1. Why is the result still empty after I input the numbers? — Check if all input fields are filled with numbers. Remember to enter 0 if a coefficient is zero. Also, ensure no letters or special characters were entered.
2. The solution is a fraction, how do I display it as a decimal? — Our calculator displays decimals by default (rounded to three decimal places). If you want to see the fractional form, check "Show steps" to view the exact fraction in the breakdown.
3. What does "No solution" or "Infinite solutions" mean? — This means the two equations either represent parallel lines (no solution) or overlapping lines (infinite solutions). Check if the coefficient ratios are identical, or verify that you copied the original problem correctly.
4. Why is my result different from the calculator's? — Please double-check that the a, b, and c values you entered match the original equations, paying special attention to negative signs and decimal points. You can also manually substitute the coefficients to see if the determinant matches.
5. Can it solve equations with three unknowns? — No, this tool is specifically designed for systems of two linear equations. For systems with three variables, please use a 3-variable system of equations calculator.
6. What method does the calculator use? — It primarily uses Cramer's Rule. If the determinant is 0, it automatically determines whether there is no solution or infinite solutions. You can see the complete determinant calculation process by checking "Show steps".
Now you can try entering your own numbers in the calculator above.

Circle Area Calculator
Quickly calculate the area of a circle by entering the radius, diameter, or circumference. Supports custom units and precision settings.

Inverse Trigonometric Function Calculator
Accurately calculate radian values for inverse trig functions like arcsin and arccos. Supports 6 function types and custom decimal precision.

Prime and Composite Number Calculator
Instantly identify prime, composite, or special numbers. Supports batch checking and mathematical property analysis.

SHAKE Hash Generator
Variable-length hash generator for SHAKE-128/256, featuring salt support, multiple iterations, and various input/output formats.

Circle Area Calculator
Quickly calculate the area of a circle by entering the radius, diameter, or circumference. Supports custom units and precision settings.

Inverse Trigonometric Function Calculator
Accurately calculate radian values for inverse trig functions like arcsin and arccos. Supports 6 function types and custom decimal precision.

Prime and Composite Number Calculator
Instantly identify prime, composite, or special numbers. Supports batch checking and mathematical property analysis.

SHAKE Hash Generator
Variable-length hash generator for SHAKE-128/256, featuring salt support, multiple iterations, and various input/output formats.

Trigonometry Calculator
Calculate six trigonometric functions from radian values with custom decimal precision.