HomeCalculatorsMathAnalytic GeometryAngle Between Lines Calculator
Math calculator

Angle Between Lines Calculator

Find the smaller angle between two planar lines in degrees and radians. Check parallel or perpendicular status, numerical limits, figures, sharing and exports.

Instant result
Result
—

Enter values to calculate.

Inputs—
Mode—
Formula—
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 smaller (principal) angle between two plane lines, each given by two distinct points, with an engine-linked figure of that angle.
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 — ui-ssr is query-result HTML, not a live browser session. Error-path engine·REST·MCP 1/1 (status, code, calculation_version). SSR compared on URL-canonical requested calculations; empty query is idle (not an error) and JSON-typed object/array inputs are REST/MCP-only.
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
Sources
Evidence
8 legacy golden · 3 legacy boundary · legacy regression suite · 309/309 oracle-backed golden · 12/12 invalid · Artifact integrity PASS
This calculator CURRENT · Public schema 1.8.0 matches · Semantic contract ✓ · Production attested · Public/cache ✓ · Origin ✓
Semantic contract
PASS
Full verification

Manifest identity, reference classes, interfaces, suite, and production records.

Formulas

Core equations used by this calculator.

Principal angleθ = arccos(|A₁A₂ + B₁B₂| / (√(A₁²+B₁²) √(A₂²+B₂²)))
Range0° ≤ θ ≤ 90°
Line from two pointsA = y₂ − y₁, B = x₁ − x₂, C = x₂ y₁ − y₂ x₁
iSame engine as /coordinate-geometry. Intersection stays on /line-intersection. Two-point line stays on /line-equation.

How to use

1

Enter the first line as two distinct points

(0, 0) and (2, 2) is y = x.

2

Enter the second line as two distinct points

(0, 0) and (2, 0) is y = 0. The principal angle is 45°.

Example calculations

Common configurations with formula and result.

ϟ

45°

(0, 0)–(2, 2) and (0, 0)–(2, 0)

arccos(1/√2)
45°
ϟ

Perpendicular

(0, 0)–(2, 0) and (0, 0)–(0, 2)

n₁ · n₂ = 0
90°
ϟ

Parallel

(0, 0)–(2, 0) and (0, 1)–(2, 1)

Δ = 0
0°

Angle Between Lines calculator specification

Version 1.8.0 · Engine tested

Calculation status

Review policy · Evidence

Definition
The principal angle θ between two undirected lines A₁x + B₁y + C₁ = 0 and A₂x + B₂y + C₂ = 0 is arccos(|A₁A₂ + B₁B₂| / (√(A₁²+B₁²) √(A₂²+B₂²))), in [0°, 90°]. For oblique lines this is the acute angle. This page is mode=angle on math.geometry.coordinate. Each line is two distinct points. Parallel and coincident lines are 0°. Perpendicular lines are 90°.
What it calculates
The smaller (principal) angle between two plane lines, each given by two distinct points, with an engine-linked figure of that angle.
Inputs
  • x1
  • y1
  • x2
  • y2
  • x3
  • y3
  • x4
  • y4
Outputs
  • angle_deg
  • angle_rad
  • status
  • supplement_deg
  • standard1
  • standard2
Formula
θ = arccos(|A₁A₂ + B₁B₂| / (√(A₁²+B₁²) √(A₂²+B₂²)))
Assumptions
  • Euclidean plane
  • Two distinct points per line
  • Undirected lines (principal angle in [0°, 90°])
  • Not 3-D / spherical
  • Not Pythagorean
  • Not CAS
Units
  • degree
  • radian
Boundary conditions
  • missing coordinates → MISSING_REQUIRED_INPUT
  • coincident points on a line → INVALID_INPUT
  • parallel distinct → status=parallel, 0°
  • same line → status=coincident, 0°
  • unknown mode (including cas, pythagorean) → INVALID_MODE
Example
x1=0 y1=0 x2=2 y2=2 x3=0 y3=0 x4=2 y4=0 → 45°
Validation cases

2 published on this page · 21/21 tests · Production surface contract 6/6 · View evidence

  • x1=0 y1=0 x2=2 y2=2 x3=0 y3=0 x4=2 y4=0 → 45°
  • mode=cas x1=0 y1=0 x2=2 y2=2 x3=0 y3=0 x4=2 y4=0 → INVALID_MODE
Sources
  • ISO 80000-2:2019 Quantities and units — Mathematics
    Supports: 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 Equations
    Supports: 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.
  • Gilbert Strang, Calculus — Chapter 11: Vectors and Matrices (MIT OpenCourseWare) — §§11.1–11.3 Vectors, Dot Products, Projections and Cross Products
    Supports: Vector components and magnitudes, dot product and angle/projection relations, and cross product/determinant orientation and area. Projecting a point displacement onto the unit normal to Ax+By+C=0 gives distance |Ax₀+By₀+C|/sqrt(A²+B²); this planar expression is derived from the projection formula. Mathematical reference only; not implementation validation or an endorsement of CalculatorX.
Calculation version
1.8.0

Background

Interpretation and common distinctions.

What does this angle between lines calculator compute?

The principal angle θ between two undirected lines A₁x + B₁y + C₁ = 0 and A₂x + B₂y + C₂ = 0 is arccos(|A₁A₂ + B₁B₂| / (√(A₁²+B₁²) √(A₂²+B₂²))), in [0°, 90°]. For oblique lines this is the acute angle.

The published formula or method is θ = arccos(|A₁A₂ + B₁B₂| / (√(A₁²+B₁²) √(A₂²+B₂²))). 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.
  • Gilbert Strang, Calculus — Chapter 11: Vectors and Matrices (MIT OpenCourseWare): Vector components and magnitudes, dot product and angle/projection relations, and cross product/determinant orientation and area. Projecting a point displacement onto the unit normal to Ax+By+C=0 gives distance |Ax₀+By₀+C|/sqrt(A²+B²); this planar expression is derived from the projection formula. 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, 0)–(2, 2) and (0, 0)–(2, 0) with arccos(1/√2). Compare it with the Example calculations and the complete result for the same inputs.

How do agents discover the angle contract and units?

Call inspect_capability with capability_id: "math.geometry.coordinate" and operation: "angle". Its operation input Schema requires mode: "angle" and all eight endpoint coordinates. Decimal strings follow the same numeric range checks as the generic contract. Distinct-point lines and numerical range are checked during execution.

REST result_detail.field_units and MCP result.field_units / result_detail.field_units identify angle_deg: "deg", angle_rad: "rad", and supplement_deg: "deg". The mixed result's scalar unit stays null; coordinate and line-coefficient fields do not inherit an angular unit. Output Schema annotations also specify each angle field's display unit and capability-scoped plane-angle kind.

The display unit tokens remain stable. field_unit_refs on REST result_detail and MCP result / result_detail associates the same fields with UUCE cx:deg or cx:rad, definition revision 1.0.0, snapshot 0.3.0-preview.3, content/dependency digests, plane-angle kind, scalar role and SI dimension vector. inspect_capability exposes these as output_field_unit_refs; Output Schema uses x-unit-id, x-dimension and x-uuce-unit annotations.

These references pin the UUCE Preview definitions: one degree is exactly π/180 radians, and plane angle remains distinct from solid angle and generic ratios despite its zero dimension vector. They do not change the calculator's floating-point numerical policy, perform automatic angle wrapping, or migrate calculation to the UUCE converter. Definition exactness is separate from numerical result accuracy.

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.

Frequently asked questions

Key distinctions behind the calculation.

Is this a second coordinate engine?

No. It is mode=angle on math.geometry.coordinate, the same engine as /calc/math/coordinate-geometry.

Is the result the acute angle?

For oblique lines, yes. The principal line angle is always in [0°, 90°]. 0° is parallel or coincident, not acute. 90° is a right angle, not acute. The supplement is 180° − θ.

What if a pair of points coincides?

That pair does not determine a unique line. The engine returns INVALID_INPUT.