CalcWorldHub
Math · CalcWorldHub

Linear Interpolation Between 3D Points: The Role of t

Linear interpolation evaluates p(t)=a+t(b−a) for each coordinate. When t is from 0 to 1, the result lies on the segment from a to b. This calculator accepts any finite t, so values outside that interval produce extrapolation.

Open calculator
A point advances by one shared parameter along the straight segment between two 3D endpoints, with the line extended past the end.

Share this article

A straight segment from start to end marks t equals zero, one quarter, one half, and one, with an extension beyond the endpoint.
The same scalar parameter advances every coordinate along the line.

Interpret the parameter before entering it

The formula p(t)=a+t(b−a) starts at a when t=0 and reaches b when t=1. At t=0.5 it returns the midpoint. Between 0 and 1, the same fraction is applied to every coordinate, so the result stays on the straight segment joining the endpoints. The parameter is dimensionless; the output retains the coordinate units of a and b.

The current calculator does not clamp t. A value below zero moves from a in the direction away from b; a value above one continues beyond b. This distinction matters because some APIs define a similarly named Lerp operation with t clamped to [0,1]. Read the behavior of the tool or library being used rather than assuming that every implementation handles out-of-range parameters the same way.

Keep endpoints in the same coordinate system

The fields are Start x, y, z; End x, y, z; and Parameter t. Use coordinates with matching axis order, origin, and compatible units. Interpolating a point in meters with an endpoint in centimeters mixes scales and produces a meaningless location even though the arithmetic runs. The calculator does not convert frames, follow a road or curved path, or apply easing; it evaluates a straight-line affine combination.

The start and end values can be negative or zero. Reversing their order changes the parameterization: p from a to b at t equals p from b to a at 1−t, for the same segment point. If the path has multiple waypoints, compute each segment separately and define how a global time parameter maps to segments. This single-segment tool does not choose that schedule for you.

Worked examples

Example 1 · quarter of a 3D segment

Inputs: a=(0,0,0), b=(10,20,30), t=0.25.

Calculation: b−a=(10,20,30); a+0.25(b−a)=(2.5,5,7.5).

Interpolated point=(2.50000, 5.00000, 7.50000), within the segment.

Example 2 · extrapolate past the end

Inputs: a=(1,−2,5), b=(5,2,1), t=1.5.

Calculation: b−a=(4,4,−4); a+1.5(b−a)=(7,4,−1).

Interpolated point=(7.00000, 4.00000, −1.00000), extrapolated beyond b.

From (0,0,0) to (10,20,30), a quarter-step produces (2.5,5,7.5).
A componentwise calculation checks the selected fraction.

Calculate every coordinate with the same t

For a=(−2,4,1), b=(6,0,9), and t=0.25, the displacement b−a is (8,−4,8). Multiply by 0.25 to get (2,−1,2), then add it to a: p=(0,3,3). The quarter fraction applies to all three axes; using separate fractions would leave the straight segment and describe a different path.

The displayed coordinates are rounded to five decimals, and t is shown to four. The result also states whether the point is within the segment or extrapolated. Keep the full precision inputs if later calculations depend on the output. The point can be checked by recovering the fraction from any coordinate whose endpoint values differ; if all coordinates agree on t, the result lies on the expected straight segment.

Compare interpolation with extrapolation

For t>1 the point lies beyond b in the direction from a to b; for t<0 it extends behind a. This calculator preserves those results instead of clamping the parameter. If an application requires points on the segment, enforce t∈[0,1] before using the output.

For example, t=−0.5 lies half a segment behind a. Apply bounds in the calling workflow when extrapolation is not allowed; the calculator intentionally returns values outside [0,1].

Understand what linear interpolation does not model

Linear interpolation produces a straight path at a constant rate with respect to t. Equal parameter steps create equal vector increments, because p(t₂)−p(t₁)=(t₂−t₁)(b−a). It does not account for acceleration, easing, obstacle avoidance, coordinate projections, or time-varying speed. If t represents time, its scale and units must be defined by the surrounding application; the form itself accepts only a numeric fraction or parameter.

The function can interpolate more than physical location when the fields represent compatible numeric coordinates, but the meaning of intermediate values depends on the data. Interpolating color channels, sensor values, or model parameters may need domain-specific bounds or transforms. The current calculator treats each axis as an ordinary real coordinate and does not know whether intermediate values are valid in the application that supplied the endpoints.

Check an interpolation by reversing or perturbing one input

At t=0, the output must equal the start; at t=1, it must equal the end. At t=0.5 it must be their coordinatewise midpoint. Reversing endpoints and replacing t with 1−t should give the same point. These checks are independent of the specific coordinates and quickly reveal sign errors in b−a or a mismatch between the start and end fields.

If only the end x coordinate increases by 4 while the other five endpoint coordinates stay fixed, an interior point at t=0.25 should increase its x coordinate by exactly 1. If t changes by 0.1, the output moves by 0.1 times the full endpoint displacement. Extremely large finite inputs can overflow in intermediate arithmetic; the runtime reports when computed coordinates exceed its supported numeric range rather than promising an infinite-domain result.

Sources and further reading

Share this article

Browse all articles · Calculator: 3D vector interpolation calculator