Generate a CSS cubic-bezier when a standard easing preset does not give you the specific acceleration, deceleration, anticipation, or overshoot you need.
A CSS cubic-bezier controls how an animated value progresses as elapsed time advances. It defines timing only, so you still need to choose the animated property, duration, delay, and surrounding interaction behavior.

Choose a Curve by the Behavior You Need
Every valid CSS cubic-bezier begins at progress point (0, 0) and ends at (1, 1). The two editable control points, (x1, y1) and (x2, y2), determine the path between those endpoints. A custom curve is useful when you need to influence where acceleration and deceleration occur, create deliberate anticipation or overshoot, or keep the same documented timing function across several components.
It is unnecessary to generate a curve when the browser's default easing already communicates the state change clearly. The decision should be based on a specific motion requirement rather than on finding more complex numbers for their own sake.
| Situation | Recommended starting point | Reason |
|---|---|---|
| A routine transition with no special timing requirement | A standard CSS easing keyword | A custom curve adds work without a clear behavioral benefit. |
| An interaction needs a specific acceleration or settling pattern | A custom cubic-bezier | Two control points give you direct control over the timing curve. |
| The motion should begin with anticipation or pass its target | Custom y coordinates | Negative y values can create anticipation, while values above 1 can create overshoot. |
| Several components must use the same documented motion | An explicit numeric declaration | The four-number result can be recorded, compared, and reused consistently. |
| You need keyframes, a spring, steps, or a complete transition | Another CSS workflow | This generator produces one cubic-bezier timing function rather than a complete animation system. |
If none of those needs applies, start with a standard keyword. If the timing must communicate a distinct interaction or remain reproducible, generating and inspecting a cubic-bezier gives you more control.
Compare Standard and Custom Timing
The five CSS easing keywords cover many routine transitions. Their standardized control points come from W3C CSS Easing Functions Level 1 and correspond to the following explicit cubic-bezier functions.
| CSS keyword | Explicit equivalent | Timing character |
|---|---|---|
| linear | cubic-bezier(0, 0, 1, 1) | Constant-speed timing |
| ease | cubic-bezier(0.25, 0.1, 0.25, 1) | Gentle acceleration and deceleration |
| ease-in | cubic-bezier(0.42, 0, 1, 1) | Slow start followed by acceleration |
| ease-out | cubic-bezier(0, 0, 0.58, 1) | Quick start that slows toward the end |
| ease-in-out | cubic-bezier(0.42, 0, 0.58, 1) | Slow start and end with acceleration through the middle |
The CSS Cubic Bezier Generator's keyword buttons expose these numeric equivalents instead of returning a hidden keyword. That is useful when you want to inspect, record, compare, or modify the exact curve. If the standard keyword already meets the requirement, using the keyword directly remains the simpler option.
Custom control points provide more control but also introduce validity and usability considerations. The x coordinates represent input-time positions, so CSS requires x1 and x2 to remain within the closed range from 0 to 1. The y coordinates represent output progress and may range from -10 through 10 when finite. A negative y value can create anticipation, while a y value above 1 can create overshoot. Extreme values remain technically valid, but they can make the motion confusing or disruptive.
Generate and Verify the Timing Function
- Choose a preset or enter four control coordinates. Open the CSS Cubic Bezier Generator, select one of the five standard easing presets, or enter x1, y1, x2, and y2. Keep both x inputs between 0 and 1 and use finite y values from -10 through 10. The interface constrains the x inputs, while the calculation independently validates the constraints before producing output.
- Review the graph, samples, and moving preview. The result updates immediately as a graph, an exact transition-timing-function declaration, five input-to-output samples, and a moving preview. The samples correspond to input progress at 0, 0.25, 0.5, 0.75, and 1. Run preview toggles a circle between two horizontal positions using a 900 millisecond transform transition and the exact generated easing string. Repeated clicks allow forward and reverse motion to be compared.
- Copy the complete declaration. Copy CSS requests clipboard permission and writes the full declaration, including its semicolon. If browser policy denies clipboard access, the declaration remains visible and selectable, and the status does not falsely report success.
- Apply it to the real interaction. Test the declaration on the intended property, distance, and duration. Check the complete context rather than relying only on the preview, and include reduced-motion behavior when the animation is not essential to understanding the state change.
Interpret the Graph and Progress Samples
The numeric samples answer a question that the control-point graph alone cannot: how far has the animated value progressed when a particular fraction of time has passed? CSS timing uses elapsed input progress on the x axis. For a sample at 50 percent input progress, the tool finds the curve parameter whose x coordinate is 0.5 and then evaluates y at that parameter. It therefore does not treat the curve parameter itself as elapsed time. This distinction is also covered in MDN's cubic-bezier documentation.
Internally, the solver uses bounded Newton iterations and finishes with bisection when necessary. Calculations retain full JavaScript numeric precision, while serialized numbers are rounded to three decimal places. This makes the samples and visible declaration useful for comparing a curve without implying that the displayed rounding changes the underlying calculation.
The graph keeps a stable zero-to-one frame so ordinary curves remain easy to compare. A deliberately extreme y value can extend the curve beyond that visible square. It is not being clamped: the sample table and animated preview still use the actual computed easing. When overshoot matters, inspect the numeric output and moving element rather than assuming the graph boundary limits the result.
Test the Curve in the Real Interface
The Run preview demonstrates timing, not production performance under every workload. Its fixed 900 millisecond transform may feel different from a real component when the distance, duration, animated property, rendering cost, input device, or surrounding motion changes. Test the final interface with realistic content and interaction conditions rather than treating the preview as proof of the final experience.
Check the direction in which the motion is read and whether repeated interactions interrupt or reverse the transition naturally. Overshoot can make an animated element appear to reverse, leave its container, reveal content that should remain clipped, or create rapid oscillation. A technically valid curve is not automatically accessible, performant, or appropriate.
Keep important state changes understandable without motion, and check focus and pointer behavior while an element is transitioning. Respect reduced-motion preferences where animation is not essential. These checks are especially important when a custom curve departs from a familiar easing pattern.
Keep the Generator's Scope Clear
The tool focuses on one cubic-bezier timing function so that the output remains easy to inspect and audit. It does not generate keyframes, spring physics, linear() stop lists, steps(), duration, delay, iteration count, or a full transition shorthand. If you need a complete transition, use the generated declaration as its transition-timing-function component and specify the other transition values separately.
All calculation happens in the browser. No curve, CSS, or interaction data is uploaded, stored, or sent to an animation service. This makes the generator suitable for experimenting with timing locally before you integrate the declaration into a larger interface.
Generate a custom curve when the standard presets do not express the required motion or when an explicit, inspectable timing function is important. Keep the standard keyword when its behavior is sufficient, and always validate the final declaration under the real interaction conditions.
For a deeper look, see What to Review After Generating a CSS Toggle Switch.
For a deeper look, see Best Way to Generate a CSS Triangle for Production.