Cubic workspace
Interactive graph of the curve and its control pointsThe horizontal axis is x. Positive y points upward. Labeled control points can be moved with the arrow keys. Drag the plot background to pan. Scroll over the plot to zoom.P0P1P2P3
Curve settings
Load a preset
Control points
P0P1P2P3
B(t)
—
Arc length
—
Advanced settings

Coordinates ±1,000,000 · Degrees 1–10 · Up to 512 sample intervals

Graph display

Numerical results

Parametric equations

Coordinate samples
txy
Export active curve

Data uses x right and y up. SVG, PNG and Canvas use x right and y down. Degree 4–10 graphics use 256 line segments. Numbers retain up to 15 significant digits.

Cubic Bezier Curve

A cubic Bezier curve uses four control points to describe a path with a start direction and an end direction. Move the points on this interactive graph, set a parameter, and inspect the weights, derivatives, and expanded equations. The SVG and Canvas outputs use native cubic path commands.

Use the four controls to shape a cubic

Start with Arch. The labeled endpoints P0 and P3 sit on the curve. Drag P1 toward P0 and watch the beginning of the arc tighten. Drag P2 toward P3 and compare the effect at the other end. Type a coordinate directly if you need the same value on both sides of a symmetric shape.

Choose the S-curve preset and look for the bend changing direction between the ends. Move t to compare the tangent before and after the bend. A line drawn along the tangent can point upward on both sides of a change in bend. Look at how the tangent itself rotates as the parameter advances.

Choose Loop to inspect a self-intersection. A crossing is a single location reached at two parameter values, potentially with two different tangent directions. Scrub forwards and follow the marker. A single x location can correspond to several parts of the curve. Use Straight cubic for a baseline with all handles arranged on one line.

Read the cubic formula and weights

Let P0 through P3 be two-dimensional points and let t run from zero to one. The expression uses Bernstein weights. Each power product below is a scalar that multiplies both coordinates of its point. At t = 0, the first weight is one and the others are zero. At t = 1, only the last weight remains. At t = 0.5 the weights are 1/8, 3/8, 3/8, and 1/8.

The weight of P1 peaks at t = 1/3, and the weight of P2 peaks at t = 2/3. The influence of each interior point is spread across the parameter interval. For example, moving P1 upward by 0.8 raises the point at t = 0.5 by 0.3. Compare that prediction with the graph before and after an exact coordinate edit.

The expanded equations group powers of t separately for x and y. For either coordinate, the coefficients from lowest power upward are P0, 3(P1 − P0), 3(P0 − 2P1 + P2), and P3 − 3P2 + 3P1 − P0. Use the expanded version for algebra. Use the control point form to see which handle influences a coordinate.

B(t) = (1 − t)³P0 + 3(1 − t)²tP1 + 3(1 − t)t²P2 + t³P3

Verify the arch and its endpoints

For the default controls (0, 0), (0, 1), (1, 1), (1, 0), B(0.5) is (0.5, 0.75). The x equation is 3t² − 2t³ and the y equation is 3t − 3t². The derivative of the y expression is zero at t = 0.5, giving the y maximum. The workspace bounds show y from zero to 0.75, even though two handles have y equal to one.

The endpoint derivatives are 3(P1 − P0) and 3(P3 − P2). For the arch they are (0, 3) and (0, −3). If you join a new cubic to the old endpoint, put its first handle along the old end derivative to make the directions agree. Use the same derivative vector on each side when first-derivative continuity in the shared parameter is needed.

If P0 and P1 coincide, the derivative at the start is zero. Inspect the expanded equation or samples near the endpoint to see how the curve leaves that point. A tangent can have a limiting direction even if the derivative at the endpoint cannot be normalized.

Measure the effect of changing one handle

Try leaving the end position and P2 fixed while moving only P1. The end derivative remains the same, even as the path bends differently earlier on. Position and direction near the other end can still change between samples. This is useful when adjusting one section of a drawn outline that meets a neighboring segment whose direction you already chose.

For a quick comparison, use the sample table before and after the edit and look at two rows with the same parameter values. The first endpoint derivative and interior positions expose different parts of the change.

Move the curve into SVG or Canvas

The SVG path starts with M for the current point. C then takes the first handle, second handle, and endpoint in that order. The Canvas equivalent uses moveTo followed by bezierCurveTo. Both outputs reflect the y values because the chart uses y up and graphics surfaces commonly use y down. Add a translation if your path lies outside the drawing area.

For a boundary check, use the extrema and bounds in Numerical results along with the endpoint values. Sampling helps inspect particular t values, but a grid of samples can step over an extremum. The coordinate bounds use roots of the derivative of each axis, so they can capture an interior maximum between sampled rows.

For CSS timing functions, use the CSS easing tool. A geometry editor allows four freely placed points, including loops. A CSS timing curve fixes the ends and restricts x for its interior controls, because each elapsed time must yield a determinate progress value.

Frequently asked questions

Can a cubic Bezier curve be a straight line?

Yes. If the handles lie on the line through the endpoints the path stays on that line. Traversal can still slow, reverse, or extend outside the endpoint interval depending on the order of the controls. The straight preset traverses at constant speed.

How can I see the derivative at a particular t?

Type t in the numeric field beside the slider and read the first derivative in Numerical results. Endpoint derivatives have a separate readout so you can compare them even with the marker in the middle.

Where are equal parameter samples useful?

Use the sampled coordinates to check a polynomial or compare two curve implementations at corresponding t values. To approximate a drawn outline from points, inspect any long gaps before relying on the sample table as a polyline.

Further reading · MDN’s SVG path commands

Explore related tools