Easing Function Generator
Create custom CSS cubic-bezier easing functions with visual curve editor for smooth animations.
Bezier Curve Editor
Preview
Cubic Bezier
cubic-bezier(0.25, 0.1, 0.25, 1)CSS Code
transition-timing-function: cubic-bezier(0.25, 0.1, 0.25, 1);animation-timing-function: cubic-bezier(0.25, 0.1, 0.25, 1);What Is a CSS Easing Function?
An easing function controls the rate of change of a CSS animation or transition over time. Rather than moving an element at a constant speed from start to finish, an easing function shapes the velocity β accelerating at the beginning, decelerating toward the end, or even momentarily reversing direction for a bouncy effect.
Every CSS transition and animation accepts a timing function. The browser's built-in keywords β ease, ease-in, ease-out, and ease-in-out β are themselves just shorthand for specific cubic-bezier() values. By using the easing function generator, you gain precise control over those same four parameters, letting you craft exactly the motion feel your design requires.
Easing functions are foundational to what designers call "motion design." A linear animation feels robotic and digital. A well-tuned easing curve makes interfaces feel physical and alive β objects that accelerate like real things do under gravity, or decelerate as if slowing to a stop. This is why professional design tools like Figma, After Effects, and CSS all center easing curves as the primary motion control.
The most expressive easing format CSS supports is the cubic-bezier() function, which this generator produces. It accepts two control points that bend a parametric curve between a fixed start at (0, 0) and a fixed end at (1, 1). The horizontal axis represents time (0% to 100% of duration) and the vertical axis represents progress (0% to 100% of value change). Placing control points outside the vertical [0, 1] range creates the overshoot and elastic effects seen in modern UI frameworks.
This free online easing function generator makes it trivial to explore the full design space: drag sliders to reshape the curve in real time, preview the animation at your chosen duration, then copy the ready-to-paste CSS directly into your stylesheet.
The Cubic-Bezier Formula
The CSS cubic-bezier(x1, y1, x2, y2) function is built on the mathematics of a parametric cubic BΓ©zier curve. The curve is defined by four points: the start Pβ = (0, 0) and end Pβ = (1, 1) are always fixed by the spec; you supply the two intermediate control points Pβ = (x1, y1) and Pβ = (x2, y2).
The parametric equations evaluate the curve position at each internal parameter value t as t sweeps from 0 to 1:
- X(t) gives the fraction of elapsed time.
- Y(t) gives the fraction of the animated value that has changed.
The browser solves for t given the actual elapsed time ratio, then reads Y(t) to know how far along the value should be. Because the X axis is constrained to [0, 1] the x1 and x2 parameters must also stay within [0, 1] for the function to represent a valid time mapping. The y1 and y2 parameters, however, may go outside [0, 1] β this is what produces overshoot, bounce, and elastic effects that momentarily exceed or undershoot the final value.
Parametric Cubic BΓ©zier Equations
Where:
- t= Curve parameter, sweeps from 0 (start) to 1 (end)
- x1, y1= Coordinates of control point Pβ (red dot); x1 β [0, 1]
- x2, y2= Coordinates of control point Pβ (green dot); x2 β [0, 1]
- X(t)= Fraction of animation duration elapsed at parameter t
- Y(t)= Fraction of the animated value achieved at parameter t
Common Easing Presets and What They Do
The generator ships with eight ready-to-use presets that cover the most common motion design needs. Each preset corresponds to a well-known animation personality:
| Preset | cubic-bezier values | Motion Character |
|---|---|---|
| Ease | 0.25, 0.1, 0.25, 1 | Gentle slow-start, fast middle, gentle slow-end. CSS default. |
| Ease In | 0.42, 0, 1, 1 | Starts slow, accelerates continuously. Good for exit animations. |
| Ease Out | 0, 0, 0.58, 1 | Starts fast, decelerates to stop. Good for enter animations. |
| Ease In Out | 0.42, 0, 0.58, 1 | Symmetrical slow-fast-slow. Ideal for slides and carousels. |
| Elastic | 0.68, β0.55, 0.265, 1.55 | Overshoots and springs back. Playful, high-energy feel. |
| Back | 0.68, β0.6, 0.32, 1.6 | Slight pull-back before launching. Creates anticipation. |
| Bounce | 0.175, 0.885, 0.32, 1.275 | Overshoots the endpoint then settles. Like a dropped object. |
| Swift | 0.55, 0, 0.1, 1 | Material Design standard β quick start, crisp stop. |
When y1 or y2 falls outside [0, 1] (such as β0.55 in Elastic or 1.55 in Bounce), the animated property will briefly exceed its starting or ending value. This is perfectly valid CSS and is exactly how overshoot effects are achieved without JavaScript.
Choosing the Right Easing for Your Use Case
Motion design best practice treats enter and exit animations differently. Elements entering the viewport should decelerate as they arrive β they appear to land. This calls for an ease-out or a custom deceleration curve with a high x1 value like (0, 0, 0.58, 1). Elements leaving the viewport should accelerate as they go β they appear to launch. Use an ease-in curve such as (0.42, 0, 1, 1) for exit transitions.
For two-state toggles β drawers, accordions, modals β an ease-in-out reads naturally because the element has an origin and a destination. The symmetric slow-fast-slow pattern matches the physical intuition of an object moving between two resting points.
Elastic and Back presets belong on micro-interactions: button presses, notification badges, icon animations, and toggle switches. Their overshoot conveys energy and responsiveness. Avoid them on large layout shifts where the visual overshoot will read as a layout bug rather than a design detail.
For data dashboards and utility interfaces, a conservative ease or even a linear curve keeps the animation from distracting the user. Reserve expressive easing for delight moments, not routine updates.
Duration interacts with easing perception. A 200 ms ease-out feels snappy and confident. The same curve at 800 ms feels slow and labored. Tune duration and easing together: use the generator's preview slider set to your intended duration before copying the CSS.
Finally, always respect the prefers-reduced-motion media query. Wrap your transitions in a media query so users who have requested reduced motion experience instant state changes instead of animated ones. The easing curve itself is harmless, but the animation duration can cause discomfort for motion-sensitive users.
Using the Generated CSS in Your Project
The generator produces two ready-to-use CSS declarations for every curve you design:
- transition-timing-function β applies the easing to a CSS
transition. Pair it withtransition-propertyandtransition-duration. - animation-timing-function β applies the easing to a CSS
@keyframesanimation. You can place it on the animation rule itself or inside individual keyframe stops for segment-specific easing.
Copy the value from the "Cubic Bezier" result card β for example cubic-bezier(0.68, -0.55, 0.265, 1.55) β and use it anywhere a CSS timing-function is accepted, including inside transition shorthand:
/* Transition shorthand */
.card {
transition: transform 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}
/* Animation rule */
.badge {
animation: pop 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55) forwards;
}
In JavaScript animation libraries such as GSAP, Motion One, or Framer Motion, you can pass the four numeric values directly as an array [x1, y1, x2, y2] β check each library's API for the exact property name. Framer Motion, for example, accepts ease: [0.42, 0, 0.58, 1].
For design tokens or Tailwind CSS, you can define custom easing values in your tailwind.config.js under theme.transitionTimingFunction and reference them as utility classes across your project, keeping motion consistent at scale.
Performance Tips for CSS Animations
Choosing a great easing function is only half the equation β the animated property also matters enormously for performance. Modern browsers can animate transform and opacity on the GPU compositor thread, meaning those animations run at 60 fps or higher without triggering layout recalculation. Properties like width, height, top, left, margin, and padding force the browser to recalculate layout on every frame, creating jank regardless of how smooth your easing curve is.
Use transform: translateX() instead of animating left, and transform: scale() instead of animating width or height. Combine with will-change: transform to hint to the browser to promote the element to its own compositing layer β but apply this hint sparingly, as each composited layer consumes GPU memory.
Easing curves with very steep initial slopes (high velocity at t=0) can appear to stutter on lower-end devices even for compositor-friendly properties if the frame budget is already tight. In those cases, a slightly softer easing with a moderate start velocity will appear smoother in practice than a theoretically sharper curve. Always test on real target hardware, not just development machines.
When you have many elements animating simultaneously β staggered list items, for example β offset start times with animation-delay rather than making each element's curve more complex. Simple, consistent easing applied with staggered delays reads as more polished than complex per-element curves.
Worked Examples
Recreating the CSS `ease` Default
Problem:
You want a transition that matches the browser's built-in `ease` keyword exactly, but using an explicit cubic-bezier value so you can fine-tune it later.
Solution Steps:
- 1Set Control Point 1 to x1 = 0.25, y1 = 0.1.
- 2Set Control Point 2 to x2 = 0.25, y2 = 1.
- 3The generator outputs: cubic-bezier(0.25, 0.1, 0.25, 1) β this is precisely the CSS spec definition of the `ease` keyword.
- 4At the curve midpoint (t β 0.5), X(0.5) β 0.28 and Y(0.5) β 0.73 β meaning roughly 73% of the value change occurs in the first 28% of elapsed time, producing the characteristic fast-middle feel.
- 5Copy the Transition output: `transition-timing-function: cubic-bezier(0.25, 0.1, 0.25, 1);` and apply it alongside your duration.
Result:
cubic-bezier(0.25, 0.1, 0.25, 1) β identical to the built-in `ease`, ready to customize.
Creating a Snappy Ease-In-Out for a Modal
Problem:
A modal dialog should feel smooth and balanced: it accelerates as it slides in from the bottom and decelerates gently as it reaches its resting position.
Solution Steps:
- 1Set Control Point 1 to x1 = 0.42, y1 = 0 β this places the first handle at the standard ease-in inflection.
- 2Set Control Point 2 to x2 = 0.58, y2 = 1 β this mirrors the handle for a symmetrical ease-out at the end.
- 3The generator outputs: cubic-bezier(0.42, 0, 0.58, 1) β equivalent to the CSS `ease-in-out` keyword.
- 4Set Duration to 0.3s in the preview and click Play to verify the curve reads as natural for a dialog-sized element.
- 5Apply: `transition: transform 0.3s cubic-bezier(0.42, 0, 0.58, 1);` to your modal wrapper, animating `transform: translateY()` for GPU compositing.
Result:
cubic-bezier(0.42, 0, 0.58, 1) β symmetrical, polished ease-in-out ideal for dialogs and drawers.
Building an Elastic Overshoot for a Button Pop
Problem:
A badge or notification count icon should pop into view with an energetic spring feel β scaling up past its final size and then settling back.
Solution Steps:
- 1Set Control Point 1 to x1 = 0.68, y1 = β0.55 β the negative y1 causes the animated value to initially move backward, creating the anticipation 'pull'.
- 2Set Control Point 2 to x2 = 0.265, y2 = 1.55 β the y2 > 1 causes the value to overshoot its final target before settling.
- 3The generator outputs: cubic-bezier(0.68, β0.55, 0.265, 1.55).
- 4Set Duration to 0.4s and play the animation preview to confirm the box slides past its destination and snaps back β the same motion you would apply to `transform: scale()`.
- 5Copy the Animation output: `animation-timing-function: cubic-bezier(0.68, -0.55, 0.265, 1.55);` and use it inside your @keyframes block.
Result:
cubic-bezier(0.68, -0.55, 0.265, 1.55) β elastic overshoot gives micro-interactions a lively, physical character.
Material Design Swift Curve for Navigation Transitions
Problem:
Material Design specifies a 'standard curve' for elements moving within the screen: fast deceleration, with motion strongly biased toward the beginning of the duration.
Solution Steps:
- 1Set Control Point 1 to x1 = 0.55, y1 = 0.
- 2Set Control Point 2 to x2 = 0.1, y2 = 1.
- 3The generator outputs: cubic-bezier(0.55, 0, 0.1, 1) β the Swift/Standard curve from Material Design 3.
- 4This curve spends roughly 80% of its value change in the first 40% of the duration, giving navigation transitions their characteristic decisive feel.
- 5Apply to shared element transitions: `transition: transform 0.35s cubic-bezier(0.55, 0, 0.1, 1);`.
Result:
cubic-bezier(0.55, 0, 0.1, 1) β rapid initial motion with a crisp, controlled stop; the Material Design standard curve.
Tips & Best Practices
- βStart with a built-in preset and adjust the sliders incrementally β small changes in y1 and y2 have dramatic effects on the animation feel.
- βKeep x1 and x2 within [0, 1] to ensure a valid, monotonic time mapping; values outside this range may produce unexpected results in some browsers.
- βUse ease-out curves (low x1, high y2) for elements entering the screen so they appear to decelerate into place naturally.
- βUse ease-in curves (high x1, low y2) for elements leaving the screen so they appear to accelerate away, not linger.
- βElastic and Back presets work best on small elements (icons, badges, toggles) β on large layout elements the overshoot reads as a bug rather than a design detail.
- βAlways preview your curve at the exact duration you'll use in production β a curve that looks great at 1 s may be imperceptible at 0.2 s.
- βAnimate `transform` and `opacity` rather than layout properties like `width` or `top` to keep animations on the GPU compositor thread and maintain 60 fps.
- βCopy the four raw numbers into a design token (e.g., in your Tailwind config or CSS custom properties) so the same easing stays consistent across your entire project.
- βFor staggered list animations, use a consistent simple curve across all items and vary only the `animation-delay` β per-item curve variation is rarely noticeable and adds complexity.
- βTest your chosen curve on a real low-end mobile device before shipping; steep overshoot curves can stutter on devices with limited GPU memory.
Frequently Asked Questions
Sources & References
Last updated: 2026-06-05
Help us improve!
How would you rate the Easing Function Generator?
Editorial Note
MyCalcBuddy Editorial Team
This page is maintained as an educational calculator reference.
Formula Source: Standard Mathematical References
by Various