Curve Length & Bézier Path Calculator

Build a planar path from connected line and cubic Bézier segments. See how the curve differs from the direct chord and how subdivision tightens the length range. Choose a maximum interval width and inspect how much precision the worksheet achieves.

Planar path length

Measure line and cubic Bézier paths

Draw a path from coordinates, then inspect its length bounds and choose how tightly to refine them.

Estimated path length
100.000000003235 mm
99.999510371464 mm to 100.000489635006 mm
Achieved interval width
0.000979263542 mm
Requested precision reached
Edit path and precision

Enter absolute coordinates in one unit. Each new segment begins at the previous endpoint.

Opening line · Line
Rounded turn · Cubic Bézier
Finishing line · Line

Path geometry and subdivision

Entered path with Rounded turn highlightedPlan view with one common scale, positive y upward. The segment list and ledger give the exact coordinates.
The blue stroke is selected. The outlined dot is the start, and the filled dot is the end.

Length and precision ledger

Whole path

Final lower bound
99.999510371464 mm
Final upper bound
100.000489635006 mm
Requested interval width
0.001 mm
Achieved interval width
0.000979263542 mm
Maximum midpoint error
0.000489631771 mm
Start to final authored point chord
78.102496759066 mm to 78.102496759067 mm
Pieces used
102

The exact midpoint differs from the path length by at most the stated error.

Rounded turn

Start
(40, 0)
Control 1
(50, 0)
Control 2
(60, 10)
End
(60, 30)
Unsplit length bounds
36.055512754639 mm to 44.142135623731 mm
Refined length bounds
39.999510371464 mm to 40.000489635006 mm
Refined midpoint
40.000000003235 mm
Pieces used
100
Download path length CSV
Show selectable CSV

How to use this calculator

  1. Enter the path start, coordinate unit and desired maximum interval width.
  2. Add each line or cubic segment’s endpoint. For a cubic, also enter its two absolute control points.
  3. Enable the closing line only if the path returns from the last point to the start along a straight line.
  4. Select a segment to inspect its control polygon, split markers, starting bound and achieved bound.
  5. Export the path coordinates and precision ledger as CSV.

The Formula

The mathematical logic powering this calculation is:

Enter absolute x and y coordinates in a common unit. Each segment starts at the preceding segment’s endpoint. A line goes from that start directly to its entered end. A cubic uses two additional control points. Its position at parameter t between 0 and 1 is (1 − t)³P₀ + 3(1 − t)²tP₁ + 3(1 − t)t²P₂ + t³P₃, where P₀ and P₃ are the endpoints. Add an optional closing line from the final authored point back to the path start.

Arc length is the integral of the curve’s speed with respect to t. For a cubic, the direct chord between its endpoints is a lower bound. The length of the control polygon through all four points is an upper bound. Split the curve exactly in half in parameter space with the de Casteljau algorithm. The two new cubics together trace the original. Their summed chords and summed control polygons provide updated bounds. A line uses its Euclidean endpoint distance for both geometric bounds.

Coordinates and split positions use exact integer numerators and dyadic denominators after subdivision. Each Euclidean distance is bracketed by directed integer square-root rounding to 10⁻¹² of the entered unit. Lower chords round downward. Upper control edges round upward. The worksheet sums these directed bounds across accepted pieces, refining the curved piece with the largest remaining gap first. Every accepted split reduces the total interval width. The midpoint gives the length estimate. The possible error of the exact midpoint is at most half the final interval width.

The goal applies to the total interval width across the whole path. Refinement stops when it reaches the goal or exhausts its bounded work. It can retain up to 4,096 pieces and 24 midpoint subdivisions on a branch. If the goal remains unmet, the displayed interval still encloses the length. Narrower bounds increase the number of pieces. Returning to the starting point can give a zero chord for a curve with positive travel. The terminal chord always uses the final authored endpoint, before any optional closing line.

Use one to eight authored segments. Coordinates lie between −1,000,000 and 1,000,000 with up to six decimal places. The requested interval width accepts 0.000001 to 1,000,000 in the same unit. The unit field labels all coordinates and lengths without conversion. The plotted curve and sampled split markers illustrate this geometry. Arc length and exported bounds use the dedicated enclosure calculation.

Worked Example

If you input:

  • Opening line: From (0, 0) to (40, 0) mm
  • Cubic segment: Controls (50, 0) and (60, 10) mm, ending at (60, 30) mm
  • Finishing line: From (60, 30) to (60, 50) mm
  • Requested maximum interval width: 0.001 mm

Result:

The 100 mm path lies between 99.999510371464 mm and 100.000489635006 mm. The resulting width is 0.000979263542 mm, within the requested 0.001 mm. The unsplit endpoint-to-endpoint chord of the whole path is about 78.1025 mm.

Frequently Asked Questions

How is curve length different from a chord?

Curve length follows the entire path. The terminal chord measures the direct line between the start and final authored point.

Why do I get two bounds?

A cubic’s chord is shorter than or equal to its length, which is shorter than or equal to its control polygon. Subdivision tightens the sum of these bounds.

What happens if I enter a very small interval width?

The solver refines the curve until it reaches the goal or exhausts its work limit. It reports the achieved bounds in either case.

Can the path return to its start and still have length?

Yes. A curve can travel away from its start and return to the same point. The path length stays positive even though the endpoint chord is zero.

What does the closing line do?

It adds the straight connection from the final authored path point to the start. If those points coincide, the added length is zero.

Similar Calculators