Line Equation Calculator
Find the line through two points, including vertical lines. Read slope and standard forms, inspect numeric limits, and share or export coordinate results.
Enter values to calculate.
Trust summary CVP VERIFIED · CVP protocol 1.0.0-proposed · Core assurance · all published modes
- Input interpretation
- Enter values to calculate.
- Result
- —
- Verified scope
- all published modes
- Assurance
- Core
- Declared partition coverage
- PASS · 8/8 declared partitions (distance, midpoint, slope, line, point-line, intersect, angle, invalid-domain) · Matrix
- Known limitations
- Core CVP does not include live graph, viewport, or pointer interaction.
- Model
- The unique line through two distinct plane points, as y = mx + b or x = x₁, with an engine-linked figure of the line.
- Scope
- Euclidean plane
- Verification
- Engine tested · Source checked · v1.8.0 · CVP VERIFIED · CVP protocol 1.0.0-proposed · Core assurance · all published modes· View Manifest · CVP overview · Specification
- Versions
- Calculation 1.8.0 · CVP protocol 1.0.0-proposed · Evidence 2026-10-29.math-uuce-fields-v1
- Verification revision
- 2026-10-29.math-uuce-fields-v1 · 3/3 property · digest 93ec4c6ee843
- Legacy regression
- 21/21 tests · Production surface contract 6/6
- Trust layers
- Verification VERIFIED · Production CURRENT · Overall CVP state: VERIFIED under CVP 1.0.0-proposed
- Reference
- O1 model · O2 expected_values · O2 numerical_behavior
- Interfaces
- PASS · UI (SSR) / REST / MCP
- Supplemental domain review
- Not performed
- Named expert review
- Not performed
- CVP suite
- 309/309 golden · 4/4 CVP boundary · 12/12 invalid · 3/3 property · 12/12 metamorphic · 4/4 cross-interface · 2/2 cross-calculator · 6/6 CVP contract · Manifest
- Sources
- ISO 80000-2:2019 Quantities and units — Mathematics
- Margaret Stevens — The Maths Workbook (University of Oxford)
- Evidence
- 8 legacy golden · 3 legacy boundary · legacy regression suite · 309/309 oracle-backed golden · 12/12 invalid · Artifact integrity PASS
- Semantic contract
- PASS
Full verification
Formulas
Core equations used by this calculator.
How to use
Enter two distinct points
(0, 1) and (2, 5) is y = 2x + 1. The distance page stays at /coordinate-geometry.
Read slope-intercept or x = x₁
y = 2x + 1, also 2x − y + 1 = 0. A vertical pair is x = x₁.
Example calculations
Common configurations with formula and result.
Slope-intercept
(0, 1) to (2, 5)
Vertical
(2, 0) to (2, 5)
Horizontal
(0, 3) to (4, 3)
Line Equation calculator specification
Version 1.8.0 · Engine tested
- Engine tested 21/21 tests · Production surface contract 6/6
- Named expert review Not performed
- Calculation version 1.8.0
- Definition
- Two distinct points determine a unique line. This page is mode=line on math.geometry.coordinate. Non-vertical lines are y = mx + b; vertical lines are x = x₁. Coincident points are invalid. Not a second engine. Not Pythagorean. Not CAS.
- What it calculates
- The unique line through two distinct plane points, as y = mx + b or x = x₁, with an engine-linked figure of the line.
- Inputs
- x1
- y1
- x2
- y2
- Outputs
- equation
- standard
- slope
- intercept
- A
- B
- C
- vertical
- Formula
y − y₁ = m(x − x₁)- Assumptions
- Euclidean plane
- Two distinct points
- Not 3-D / spherical
- Not Pythagorean
- Not CAS
- Units
- length (consistent units)
- Boundary conditions
- missing coordinates → MISSING_REQUIRED_INPUT
- coincident points → INVALID_INPUT
- unknown mode (including cas, pythagorean) → INVALID_MODE
- Example
- x1=0 y1=1 x2=2 y2=5 → y = 2x + 1
- Validation cases
2 published on this page · 21/21 tests · Production surface contract 6/6 · View evidence
- x1=0 y1=1 x2=2 y2=5 → y = 2x + 1
- mode=cas x1=0 y1=1 x2=2 y2=5 → INVALID_MODE
- Sources
- ISO 80000-2:2019 Quantities and units — MathematicsSupports: Mathematical symbols and notation. This standard is not numerical verification or an endorsement of this implementation.
- Margaret Stevens — The Maths Workbook (University of Oxford) — Chapter 2, §3: Linear Functions; Chapter 1, §4: Simultaneous EquationsSupports: Linear-function slopes and point-slope equations, and simultaneous linear equations in two variables. Line intersection is the corresponding system solution; vertical lines use an implicit rather than finite-slope representation. Mathematical reference only; not implementation validation or an endorsement of CalculatorX.
- ISO 80000-2:2019 Quantities and units — Mathematics
- Calculation version
- 1.8.0
Background
Interpretation and common distinctions.
What does this line equation calculator compute?
Two distinct points determine a unique line.
The published formula or method is y − y₁ = m(x − x₁). The following references support the stated mathematics or method:
- Margaret Stevens — The Maths Workbook (University of Oxford): Linear-function slopes and point-slope equations, and simultaneous linear equations in two variables. Line intersection is the corresponding system solution; vertical lines use an implicit rather than finite-slope representation. Mathematical reference only; not implementation validation or an endorsement of CalculatorX.
Which inputs and limits should you check?
Keep both points and line coefficients in the same coordinate system. Parallel, coincident, or degenerate lines require their own result classifications.
The worked example uses (0, 1) to (2, 5) with m = 2. Compare it with the Example calculations and the complete result for the same inputs.
How can you verify and cite this result?
CalculatorX is responsible for this page. The mathematical references above explain the model; implementation checks and their scope are documented separately in the math.geometry.coordinate v1.8.0 Evidence and capability contract. Read the displayed verification and production state together with the specification's numerical limits.
Use the clean calculator URL to cite the tool. A shared input link identifies a particular calculation. Content updates, numerical verification, and domain reviews have separate dates and scopes.
Numerical domain and interpretation
Coordinates are Cartesian values in one consistent length unit. Inputs accept finite decimal numbers or decimal strings; nonzero coordinates and published numeric outputs must be normal binary64 (absolute value at least 2⁻¹⁰²²). Nonzero text that converts to zero is rejected as NUMERIC_UNDERFLOW. NUMERIC_RANGE means translate or rescale your inputs. Explicit empty fields are errors, not defaults.
All seven operations use the same engine. Distance and midpoint allow identical points; slope and line operations require distinct defining points. A vertical line has null slope and intercept. Intersections concern infinite lines, not segments: parallel distinct lines return empty, coincident lines return coincident, and both have null intersection coordinates.
Exact dyadic predicates classify the normalized binary64 directions without an absolute geometric epsilon. The principal undirected angle is atan2(|d₁×d₂|, |d₁·d₂|), in [0°,90°], with radians also available. A rounded angle of90° does not itself imply an exact perpendicular classification. Nearly parallel lines are sensitive to input rounding; exact predicates do not recover decimal information lost before computation. Typical well-conditioned scalar comparisons use relative2e−12; no input perturbation or intersection-position bound is claimed.
Line coefficients use integer gcd only for exact safe integers; otherwise they share a power-of-two normalization and canonical sign. Display equations are floating presentations. The uniformly scaled figure is schematic; close labels may merge, and an unrepresentable plotting range is explicitly omitted. Complete numerical results and raw supplied inputs are available in exports.
Browser calculations run locally. A shared URL sends its parameters to the server and may appear in service logs; REST/MCP also send inputs. This page makes no claim about a fixed log retention period or processing region.
Related tools
Other calculators in this family: Angle Between Lines Calculator, Coordinate Geometry Calculator, Line Intersection Calculator, Point Line Distance Calculator . Explore all Analytic Geometry.
Frequently asked questions
Key distinctions behind the calculation.
Is this a second coordinate engine?
No. It is mode=line on math.geometry.coordinate, the same engine as /calc/math/coordinate-geometry.
What if the points coincide?
There is no unique line. The engine returns INVALID_INPUT.
Where are distance and midpoint?
/calc/math/coordinate-geometry is the same engine: mode=distance and mode=midpoint.