Line Through Two Points (3D) Calculator

Published on: April 19, 2026

This Line Through Two Points (3D) Calculator helps you find the equation of a line in three-dimensional space that passes through two given points. First use the two points to find the direction vector, then substitute that vector and one point into the line equation. This gives the line in vector form and parametric form. It is a simple way to check answers, understand the method clearly, and practise 3D coordinate geometry step by step.

Step-by-step method

  1. Identify the point components.
  2. Compute the direction vector P₂ − P₁.
  3. Write the vector form r = r₁ + t(P₂ − P₁) and substitute values.
  4. Write the parametric form (and symmetric form if applicable).

Formula:

r=r1+td
x=x1+at, y=y1+bt, z=z1+ct

Example 1: (1,2,3),(4,5,6)

Step 1 - Identify the components.

In this problem: From the given points P1 = (1, 2, 3) and P2 = (4, 5, 6), the components are:

x1=1, y1=2, z1=3
x2=4, y2=5, z2=6

Step 2a - Write the direction formula.

In this problem: Use d = P₂ − P₁.

d=P2P1

Step 2b - Substitute the points.

In this problem: Substitute P₁ and P₂.

d=( 4, 5, 6 )( 1, 2, 3 )

Step 2c - Simplify the direction vector.

In this problem: Compute P₂ − P₁.

d=( 3, 3, 3 )

Step 3a - Write the vector form.

In this problem: Use r = r₁ + td.

r=r1+td

Step 3b - Substitute values.

In this problem: Replace r₁ with P₁ and d with P₂ − P₁.

r=( 1, 2, 3 )+t( 3, 3, 3 )

Step 4a - Write the parametric form.

In this problem: Convert the vector form into x(t), y(t), z(t).

x=x1+at, y=y1+bt, z=z1+ct

Step 4b - Substitute values.

In this problem: Substitute the point and direction components.

x=1 + 3t, y=2 + 3t, z=3 + 3t

Step 4c - Write the symmetric form.

In this problem: Since all direction components are nonzero, the symmetric form is valid.

x1
3
=
y2
3
=
z3
3

Final answer: Vector form: r = (1, 2, 3) + t(3, 3, 3)

Example 2: (0,0,0),(1,0,0)

Step 1 - Identify the components.

In this problem: From the given points P1 = (0, 0, 0) and P2 = (1, 0, 0), the components are:

x1=0, y1=0, z1=0
x2=1, y2=0, z2=0

Step 2a - Write the direction formula.

In this problem: Use d = P₂ − P₁.

d=P2P1

Step 2b - Substitute the points.

In this problem: Substitute P₁ and P₂.

d=( 1, 0, 0 )( 0, 0, 0 )

Step 2c - Simplify the direction vector.

In this problem: Compute P₂ − P₁.

d=( 1, 0, 0 )

Step 3a - Write the vector form.

In this problem: Use r = r₁ + td.

r=r1+td

Step 3b - Substitute values.

In this problem: Replace r₁ with P₁ and d with P₂ − P₁.

r=( 0, 0, 0 )+t( 1, 0, 0 )

Step 4a - Write the parametric form.

In this problem: Convert the vector form into x(t), y(t), z(t).

x=x1+at, y=y1+bt, z=z1+ct

Step 4b - Substitute values.

In this problem: Substitute the point and direction components.

x=t, y=0, z=0

Final answer: Vector form: r = (0, 0, 0) + t(1, 0, 0)