Linear Equation Calculator
Solve linear equations, find the slope and y-intercept of a line, and evaluate linear functions at any point.
Reviewed by the ToolNestr Editorial Team — July 2026
How linear equation calculations work
A linear equation in one variable has the form ax + b = c, where a, b, and c are constants and a ≠ 0. The solution isolates x on one side: x = (c - b)/a. Geometrically, this is the x-coordinate where the line y = ax + b intersects the horizontal line y = c. Linear equations are the simplest type of algebraic equation and are fundamental to algebra.
The slope-intercept form y = mx + c is directly related. Here, m (the slope) represents the rate of change — how much y changes when x increases by 1. The y-intercept c is the value of y when x = 0. From our equation ax + b = c, if we think of y = ax + b, then solving ax + b = c means finding x where the line y = ax + b equals c.
The slope m = a and the y-intercept is b. This connection between the symbolic equation and the geometric line is one of the most important ideas in algebra. It allows you to visualize equations as lines and interpret solutions as intersection points on a coordinate plane.
The formula explained
Solving ax + b = c
x = (c - b) / a
Subtract b from both sides, then divide by a. Requires a ≠ 0 for a unique solution.
Slope-intercept form
y = mx + c
m = slope (rise/run), c = y-intercept (where the line crosses the y-axis). From ax + b = c, m = a.
Worked example: 2x + 3 = 11
Step 1: 2x + 3 = 11 → subtract 3 from both sides: 2x = 8
Step 2: Divide both sides by 2: x = 4
Solution: x = 4
Verification: 2(4) + 3 = 8 + 3 = 11 ✓ The line y = 2x + 3 crosses y = 11 at x = 4.
The line has slope m = 2 and y-intercept at (0, 3). For each unit increase in x, y increases by 2.
Students
Linear equations are the first major topic in algebra. Understanding how to solve them, interpret them graphically, and connect the algebraic and geometric representations is essential for all advanced mathematics.
Economists
Linear supply and demand curves, cost functions, and budget constraints are fundamental economic models. The slope represents marginal cost or marginal utility, and the intercept represents fixed costs or base demand.
Engineers
Linear relationships appear throughout engineering: Ohm's law (V = IR), stress-strain relationships in the elastic region, and temperature conversion (F = 1.8C + 32). Linear interpolation estimates values between known data points.
Data Scientists
Linear regression is the most fundamental machine learning algorithm. It finds the line of best fit through data points by minimizing the sum of squared errors. The slope and intercept are the model parameters learned from training data.
How to use the linear equation calculator
Enter the equation
Fill in the values a, b, and c for the equation ax + b = c. All values can be integers, decimals, or fractions.
Get the solution
The value of x is calculated instantly. The slope-intercept form y = mx + c is shown along with the slope and y-intercept.
Verify the result
The calculator shows the verification step, substituting x back into the original equation to confirm the solution is correct.
Tips for working with linear equations
Understanding slope intuitively
The slope m = rise / run. A slope of 2 means the line rises 2 units for every 1 unit to the right. A slope of -0.5 means it falls 0.5 units per unit right. Zero slope is horizontal. Undefined slope (division by zero) is vertical. The sign of the slope tells you the direction of the relationship between x and y.
Parallel and perpendicular lines
Two lines are parallel if they have the same slope (m₁ = m₂). Two lines are perpendicular if their slopes are negative reciprocals (m₁ × m₂ = -1). For example, a line with slope 2 is perpendicular to any line with slope -1/2. These properties are used in coordinate geometry and design.
Finding the equation from two points
Given points (x₁, y₁) and (x₂, y₂), the slope is m = (y₂ - y₁) / (x₂ - x₁). Then use the point-slope form y - y₁ = m(x - x₁) and rearrange to slope-intercept form. This is how linear regression determines the best-fit line from data points.
Linear equations with fractions
When a, b, or c are fractions, you can multiply both sides of the equation by the least common denominator (LCD) to clear the fractions. For example, (1/2)x + 1/3 = 3/4 can be multiplied by 12 (LCD of 2, 3, 4) to get 6x + 4 = 9, then solve normally.
Related tools
Quadratic Equation Solver
Solve quadratic equations using the quadratic formula with real and complex roots.
📐Polynomial Calculator
Add, subtract, multiply, and evaluate polynomials of any degree.
⚖Ratio & Proportion Calculator
Solve ratios and proportions, and find the missing value in a:b = c:d.
Frequently asked questions
What is a linear equation?
A linear equation is an equation of the form ax + b = c, where a, b, and c are constants and x is the variable. The graph of a linear equation is a straight line.
What is slope-intercept form?
Slope-intercept form is y = mx + c, where m is the slope (rate of change) and c is the y-intercept (where the line crosses the y-axis). This is the most common way to represent a linear equation.
What does the slope represent?
The slope m measures the steepness of a line. It is the change in y divided by the change in x (rise over run). A positive slope goes upward, negative goes downward, and zero slope is horizontal.
How do I solve ax + b = c?
Subtract b from both sides to get ax = c - b, then divide by a to get x = (c - b) / a. For example, 2x + 3 = 11 becomes 2x = 8, so x = 4.
What if a = 0 in a linear equation?
If a = 0, the equation becomes 0·x + b = c, or b = c. If b = c, any x satisfies the equation (infinite solutions). If b ≠ c, there are no solutions. The calculator handles both cases.