Skip to main content
EverydayToolsSIMPLE • FREE • FAST
HomeCategories
Search tools...
  1. Home
  2. Education
  3. Linear Equation Solver
Advertisement
Loading...
Advertisement
Loading...

Solve and graph linear equations in any form — step-by-step

Linear equations are the foundation of algebra and appear everywhere in science, engineering, finance, and everyday problem-solving. Whether you are a student learning to solve for x, a teacher preparing worked examples, or a professional needing quick slope-intercept calculations, this Linear Equation Solver handles all four standard forms instantly with full step-by-step explanations. A linear equation describes a straight line when graphed on a coordinate plane. The simplest type is the single-variable equation ax + b = c, where you solve for the unknown variable x. More advanced forms describe entire lines: slope-intercept form (y = mx + b) is the most commonly used because the slope m and y-intercept b are immediately readable. Standard form (Ax + By = C) is preferred in many textbooks and professional contexts. Point-slope form (y − y₁ = m(x − x₁)) is most useful when you know a point on the line and its slope, but not the y-intercept. The solver supports four calculation modes. Single Variable mode solves ax + b = c for x using the isolation technique: subtract b from both sides, then divide both sides by a. Slope-Intercept mode accepts a slope and y-intercept and computes the full line equation, intercepts, angle of inclination, and the slopes of any parallel or perpendicular line. Two-Points mode takes two coordinate pairs (x₁, y₁) and (x₂, y₂), calculates the slope using the rise-over-run formula (m = (y₂ − y₁) / (x₂ − x₁)), the y-intercept, and then converts to all three standard forms. It also computes the distance between the two points and their midpoint. Standard Form mode takes Ax + By = C and converts it to slope-intercept form by solving for y, providing the slope, intercepts, and all other properties. Every result includes a live graph powered by the built-in SVG LineGraph component — no third-party library required. The graph plots the line from x = −10 to x = 10, marks the x-intercept and y-intercept, and includes a reference zero line. For single-variable equations, the graph is omitted since there is only one solution value. A collapsible step-by-step section walks through each arithmetic operation so students can follow the working and learn the technique, not just the answer. All results can be copied to clipboard, exported to a CSV file for use in spreadsheets, or printed directly from the browser. The angle of inclination (in degrees) tells you how steeply the line rises or falls relative to the horizontal x-axis. A 0° angle is a horizontal line. A 45° angle means the slope is exactly 1 (rises one unit for every one unit across). A 90° angle is a vertical line with an undefined slope. This is especially useful in physics, trigonometry, and construction calculations. Parallel and perpendicular slopes are derived automatically. Two lines are parallel if they share the same slope. Two lines are perpendicular if their slopes are negative reciprocals of each other (m₁ × m₂ = −1). Knowing these values helps you write equations for related lines without additional calculation. The decimal precision control lets you switch between 2, 4, 6, and 8 decimal places depending on whether you need a quick estimate or high-precision output. Quick preset buttons load common example equations so you can explore the calculator immediately without typing.

Understanding Linear Equations

What Is a Linear Equation?

A linear equation is any equation where the highest power of the variable is 1 — no squares, cubes, or other exponents. When plotted on a coordinate plane, a linear equation with two variables always produces a perfectly straight line. The general form is y = mx + b, where m controls the steepness (slope) and b controls where the line crosses the y-axis. Linear equations model constant-rate relationships: speed over time, price per unit, tax rates, simple interest, and many other real-world situations where change is uniform and predictable. Mastering linear equations is the single most important step in learning algebra because nearly all higher mathematics builds on them.

How Are Linear Equations Solved?

Single-variable equations (ax + b = c) are solved by isolating x: first subtract b from both sides to get ax = c − b, then divide both sides by a to get x = (c − b) / a. For lines in slope-intercept form (y = mx + b), the slope is m and the y-intercept is b — they are already explicit. The x-intercept is found by setting y = 0 and solving: x = −b / m. When given two points (x₁, y₁) and (x₂, y₂), the slope is m = (y₂ − y₁) / (x₂ − x₁) and the y-intercept is b = y₁ − m·x₁. Standard form Ax + By = C converts to slope-intercept by dividing: m = −A/B and b = C/B.

Why Do Linear Equations Matter?

Linear equations appear in virtually every quantitative field. In physics, velocity = distance / time is a linear relationship. In finance, simple interest calculations, break-even analysis, and cost-revenue models all use linear equations. Engineers use linear equations to model loads, electrical circuits, and fluid flow at constant rates. Data scientists use linear regression — an extension of linear equations — to find trend lines in datasets. Even everyday tasks like splitting a bill, calculating fuel costs for a trip, or figuring out how many hours to work to reach a savings goal involve linear reasoning. Building a strong intuition for linear equations is one of the most broadly applicable skills in mathematics.

Limitations and Edge Cases

This solver handles linear equations only — those where all variables appear with exponent 1. It cannot solve quadratic, cubic, or higher-degree polynomial equations (use the dedicated solvers for those). Vertical lines (x = c) have an undefined slope and cannot be expressed in slope-intercept form; the solver handles these by displaying 'x = c' directly. When two points have the same x-coordinate but different y-coordinates, the line is vertical. When they share the same y-coordinate, the line is horizontal (slope = 0). Division by zero is handled gracefully: if the slope is zero, the perpendicular slope is displayed as infinity (∞). Equations with infinitely many solutions (0 = 0) or no solutions (0 = 5) are outside scope and require an algebra system; this solver focuses on well-defined single-solution and line-equation forms.

Linear Equation Formulas

Slope-Intercept Form

y = mx + b

The most common form of a linear equation where m is the slope (rate of change) and b is the y-intercept (where the line crosses the y-axis).

Point-Slope Form

y − y₁ = m(x − x₁)

Used when you know one point (x₁, y₁) on the line and the slope m. Useful for writing the equation of a line through a known point.

Standard Form

Ax + By = C

A form using integer coefficients where A, B, and C are constants. Preferred in many textbooks and useful for finding intercepts directly.

Cramer's Rule for 2×2 Systems

x = (C₁B₂ − C₂B₁) / (A₁B₂ − A₂B₁), y = (A₁C₂ − A₂C₁) / (A₁B₂ − A₂B₁)

Solves a system of two linear equations A₁x + B₁y = C₁ and A₂x + B₂y = C₂ using determinants. The system has a unique solution when the denominator (determinant) is non-zero.

Linear Equations Reference Tables

Methods for Solving Systems of Linear Equations

Comparison of the three standard methods for solving systems of two linear equations in two unknowns.

MethodProcedureBest Used When
SubstitutionSolve one equation for one variable, substitute into the otherOne variable has coefficient 1 or −1
EliminationAdd or subtract equations to eliminate one variableCoefficients are easy to match by multiplying
Cramer's RuleUse determinants to find each variable directlyYou want a formulaic approach; coefficients are integers
GraphicalPlot both lines and find the intersection pointYou need a visual understanding or approximate solution

Special Cases in Linear Systems

When a system of two linear equations does not have exactly one solution.

CaseGeometric MeaningAlgebraic IndicatorNumber of Solutions
Unique SolutionLines intersect at one pointDeterminant ≠ 0 (different slopes)Exactly 1
No SolutionLines are parallel (never intersect)Same slope, different y-intercepts0
Infinite SolutionsLines are identical (coincident)Same slope and same y-interceptInfinitely many

Worked Examples

Solve the System {2x + y = 7, x − y = 2} by Elimination

Solve two simultaneous linear equations by adding them to eliminate y.

1

Write both equations: (1) 2x + y = 7 and (2) x − y = 2

2

Add equations (1) and (2) to eliminate y: (2x + y) + (x − y) = 7 + 2

3

Simplify: 3x = 9, so x = 3

4

Substitute x = 3 into equation (2): 3 − y = 2, so y = 1

5

Verify in equation (1): 2(3) + 1 = 7 ✓

The solution is x = 3, y = 1.

Find the Equation of the Line Through (3, 5) and (7, 13)

Given two points, find the line equation in slope-intercept, point-slope, and standard form.

1

Calculate slope: m = (13 − 5) / (7 − 3) = 8 / 4 = 2

2

Use point-slope form with (3, 5): y − 5 = 2(x − 3)

3

Convert to slope-intercept: y = 2x − 6 + 5 = 2x − 1

4

Convert to standard form: −2x + y = −1, or 2x − y = 1

Slope-intercept: y = 2x − 1. Standard form: 2x − y = 1. Slope = 2, y-intercept = −1.

Determine if Two Lines Are Parallel, Perpendicular, or Neither

Line 1: y = 3x + 2. Line 2: y = −(1/3)x + 5. Determine their relationship.

1

Identify slopes: m₁ = 3, m₂ = −1/3

2

Check parallel: m₁ = m₂? 3 ≠ −1/3, so not parallel

3

Check perpendicular: m₁ × m₂ = −1? 3 × (−1/3) = −1 ✓

4

The lines are perpendicular (they meet at a 90° angle)

The lines are perpendicular because the product of their slopes equals −1.

How to Use the Linear Equation Solver

1

Choose Your Equation Form

Select the mode that matches your equation: Single Variable (ax + b = c) to find one unknown x, Slope-Intercept to work with y = mx + b, Two Points to find the line through two coordinates, or Standard Form to convert Ax + By = C. The input fields update instantly when you switch modes.

2

Enter Your Coefficients

Type the numeric values into the fields. Decimals and negative numbers are fully supported — enter them with a minus sign (e.g., −3.5). Use the Quick Examples buttons to load a sample equation immediately. The equation preview at the top updates in real time as you type so you can confirm you have entered it correctly.

3

Review the Solution and Graph

Results appear automatically as you type. The hero section shows the primary answer. Below it, all three equation forms (slope-intercept, standard, point-slope) are shown side by side. Key properties — slope, intercepts, angle of inclination, and parallel/perpendicular slopes — are listed below. The line graph plots the equation from x = −10 to x = 10 with intercepts marked.

4

Export or Print Your Results

Click Copy Results to copy all key values to your clipboard for pasting into notes or a homework document. Click Export CSV to download a spreadsheet-ready file. Click Print to open the print dialog for a clean printout. Use the Step-by-Step Solution panel to expand the full arithmetic working — ideal for checking your own work or understanding the method.

Frequently Asked Questions

What is the difference between slope-intercept form and standard form?

Slope-intercept form (y = mx + b) is the most common in algebra courses because the slope m and y-intercept b are immediately visible without any manipulation. It is ideal when you want to graph the line quickly. Standard form (Ax + By = C) uses integer coefficients and is preferred in some textbooks, standardized tests, and computer algorithms because it treats x and y symmetrically. Both forms represent exactly the same line — this solver converts between them automatically so you always have both. Point-slope form (y − y₁ = m(x − x₁)) is most useful when you know one point and the slope but not the y-intercept.

How do I find the slope of a line given two points?

The slope formula is m = (y₂ − y₁) / (x₂ − x₁), often described as 'rise over run'. Rise is the vertical change (y₂ − y₁) and run is the horizontal change (x₂ − x₁). A positive slope means the line goes up from left to right. A negative slope means it goes down. A slope of zero means the line is perfectly horizontal. An undefined slope (division by zero) means the line is vertical — x₁ = x₂. Enter both points in Two Points mode and the solver calculates the slope, y-intercept, line equation, distance, and midpoint automatically.

What does the angle of inclination mean?

The angle of inclination (θ) is the angle the line makes with the positive x-axis, measured counterclockwise. It is calculated as θ = arctan(m) × (180/π). A horizontal line has θ = 0°. A line with slope 1 has θ = 45°. A line with slope −1 has θ = −45° (or 135° measured from the positive x-axis). Vertical lines have θ = 90° and an undefined slope. The angle is useful in trigonometry, navigation, and any application where direction or bearing matters, such as calculating the angle of a ramp or the elevation of a hill.

What is the perpendicular slope and when do I need it?

Two lines are perpendicular if they cross at exactly a 90° angle. The slopes of perpendicular lines satisfy m₁ × m₂ = −1, so the perpendicular slope is −1/m. For example, if a line has slope 3, the perpendicular slope is −1/3. If a line has slope −2, the perpendicular is 1/2. You need this when constructing a normal to a surface, finding the shortest distance from a point to a line, building right angles in geometry proofs, or in computer graphics when calculating reflections and shadows. The solver displays the perpendicular slope alongside the parallel slope in every result.

How do I convert standard form to slope-intercept form?

Starting from Ax + By = C, isolate y by subtracting Ax from both sides to get By = −Ax + C, then divide every term by B to get y = (−A/B)x + C/B. The slope is m = −A/B and the y-intercept is b = C/B. For example, 3x − 2y = 6 becomes −2y = −3x + 6, then y = (3/2)x − 3, so m = 1.5 and b = −3. If B = 0, the equation represents a vertical line x = C/A with an undefined slope. This solver performs the conversion automatically in Standard Form mode.

Can this solver handle decimal and fraction coefficients?

Yes. All input fields accept any real number including decimals (e.g., 1.5, −0.75, 3.14159) and integers. There is no fraction input mode, but you can enter decimal equivalents of fractions: 1/2 = 0.5, 1/3 ≈ 0.3333, 2/5 = 0.4. The decimal precision control lets you choose 2, 4, 6, or 8 decimal places in the output. Results are automatically rounded near integer values to avoid floating-point noise (e.g., 2.9999999 is displayed as 3). For exact fraction arithmetic, a Computer Algebra System (CAS) like Wolfram Alpha would be more appropriate.

Related Tools

Equation Solver

Solve linear, quadratic, and polynomial equations with step-by-step working.

Cubic Equation Solver

Find all three roots of cubic polynomial equations with full analysis.

Algebra Calculator

Solve, simplify, factor, and expand algebraic expressions with step-by-step solutions.

Matrix Calculator

Perform matrix operations including multiplication, determinants, and inverse matrices.

Derivative Calculator

Compute derivatives of functions with step-by-step differentiation rules shown.

EverydayToolsSIMPLE • FREE • FAST

Free online tools for non-IT professionals. Calculators, converters, generators, and more.

Popular Categories

  • Health Calculators
  • Finance Calculators
  • Conversion Tools
  • Math Calculators

Company

  • About
  • Contact
  • Privacy Policy
  • Terms of Service

© 2026 EverydayTools.io. All rights reserved.