Line Slope, Y-Intercept & Equation Solver

Two-Point Slope & Line Equation (y = mx + b) Solver

Find line slope (m), y-intercept (b), standard line equation, Euclidean distance, and midpoint with vertical line detection.

Point 1 (x₁, y₁)

Point 2 (x₂, y₂)

Line Equation & Geometric Metrics Client-Side Execution
Slope (m)

2.000

Δy/Δx = 6/3
Equation

y = 2.00x + 0.00

y-intercept: 0.00
Segment Distance

6.708

√(Δx² + Δy²)
Midpoint & Angle

(2.5, 5.0)

Inclination: 63.4°

At a Glance

Category
Algebra
Best For
Algebra students and anyone who needs the equation of a line
Privacy
100% in your browser: nothing you enter is uploaded
Time Required
Under a minute
Cost
Free
Updated
November 2026

Quick Overview

What This Tool Does

Calculates the rise over run between two points, finds where the line crosses the y-axis and writes the equation in slope-intercept form.

Who Should Use It

Algebra and geometry students, teachers, and anyone modeling a straight-line trend.

When to Use It

When you have two points and need the line through them.

Why It Is Useful

It automates the slope formula and intercept and also gives the geometry of the segment.

Key Features & Capabilities

Equation in y = mx + b form

Slope and intercept with the equation.

Distance and midpoint

Geometric measures of the segment.

Special cases

Vertical, horizontal and identical points are identified.

How to Use This Tool

1

Enter point 1

Type the coordinates x₁ and y₁ of the first point. Tip: Use any real numbers.

2

Enter point 2

Type the coordinates x₂ and y₂ of the second point. Tip: The points must be different.

3

Read slope and intercept

The slope is rise ÷ run; the intercept is where the line crosses the y-axis. Tip: A vertical line has no slope-intercept form.

4

Use the equation

Substitute any x to find y. Tip: Check that both points satisfy the equation.

Worked Real-World Example

Points (1, 2) and (4, 8)

A line passes through (1, 2) and (4, 8).

Sample Inputs
x₁1
y₁2
x₂4
y₂8
Liney = 2x (slope 2, intercept 0, distance 6.708)
Calculation Breakdown
Slope: (8 − 2) ÷ (4 − 1) = 2
Intercept: 2 − 2 × 1 = 0
Equation: y = mx + b = y = 2x
Distance, midpoint, angle: √(3² + 6²); (2.5, 5); arctan 2 = 6.708; (2.5, 5); 63.43°
For every 1 unit across, the line rises 2 units, and it passes through the origin. Check: at x = 4, y = 8.

How It Works (Math & Calculation Logic)

Slope m = (y₂ − y₁) ÷ (x₂ − x₁). Intercept b = y₁ − m × x₁. Distance = √((x₂ − x₁)² + (y₂ − y₁)²). Midpoint = ((x₁ + x₂) ÷ 2, (y₁ + y₂) ÷ 2). Angle = arctan(m). A vertical line (x₁ = x₂) has no slope-intercept form.

Formula / Algorithmm = (y₂ − y₁) ÷ (x₂ − x₁) y = mx + b
Variable & Logic Definitions
mSlope - Rise over run
by-intercept - Value of y when x = 0
(x, y)Point - Coordinates

How to Interpret Your Results

Typical Benchmarks

Slope can be any real number: positive rises, negative falls, zero is horizontal.

Evaluating Your Output

Steeper lines have larger absolute slopes.

Recommended Next Action

Verify by substituting both points into the equation.

Frequently Asked Questions

How do you find the slope between two points?
Divide the change in y by the change in x.
What is slope-intercept form?
y = mx + b, with slope m and y-intercept b.
How do you find the y-intercept?
Compute b = y₁ − m × x₁ using either of the two points.
What if the line is vertical?
The slope is undefined; the equation is x = constant.
What does a negative slope mean?
The line falls as x increases.

Complementary QuickForma Utilities

Mathematics & Statistics

Linear Equation Solver

Solve 1-variable linear equations of the form ax + b = c for x with step-by-step verification.

Open Tool
Mathematics & Statistics

Distance & Midpoint Calculator

Calculate Euclidean distance, midpoint coordinates, and line slope between two 2D points.

Open Tool
Mathematics & Statistics

Trigonometry Calculator

Calculate sine (sin), cosine (cos), and tangent (tan) in degrees or radians.

Open Tool
Mathematics & Statistics

Simple Linear Regression & R² Line of Best Fit

Calculates regression line equation ŷ = β₀ + β₁ x, correlation r, and coefficient of determination R².

Open Tool
Mathematics & Statistics

3x3 Systems of Linear Equations Solver

Solves 2-variable and 3-variable systems of linear equations using Cramer's Rule / Gaussian elimination.

Open Tool
Mathematics & Statistics

Percentage Change & Percentage Difference Solver

Dedicated standalone solver for percentage change vs percentage difference calculations.

Open Tool
Mathematics & Statistics

Chi-Square Goodness-of-Fit & Independence Test

Calculates Chi-Square statistic (chi²), degrees of freedom, and p-value for contingency tables.

Open Tool
Mathematics & Statistics

One-Way & Two-Way ANOVA F-Test Calculator

Computes Analysis of Variance (ANOVA) table, Sum of Squares, Mean Squares, and F-statistic.

Open Tool
Mathematics & Statistics

Sample & Population Variance Standalone Solver

Calculates sample variance (s²) and population variance (σ²) with step-by-step deviation sums.

Open Tool
Mathematics & Statistics

Paired & Unpaired Two-Sample Student's t-Test

Calculates 1-sample, 2-sample independent, and paired t-test statistics and p-values.

Open Tool
Mathematics & Statistics

p-Value Calculator from Z, t, F & Chi-Square Statistics

Converts test statistics (Z, t, F, chi²) into one-tailed and two-tailed p-values.

Open Tool