easeInOutCubic
Progress grows with the cube of time. Clearly eased, still neutral — the workhorse of product motion. An ease-in-out speeds up and slows down symmetrically. Use it for objects that move from one resting place to another while staying on screen.
Code
The cubic-bezier is a close fit (up to 1 % off). The CSS linear() value and the JavaScript function are exact.
/* Exact curve (all modern browsers): */
transition: transform 600ms linear(0, 0.004 9.7%, 0.019 16.7%, 0.049 23%, 0.07 26%, 0.096 28.8%, 0.131 32%, 0.171 35%, 0.217 37.8%, 0.269 40.7%, 0.325 43.3%, 0.385 45.8%, 0.447 48.2%, 0.585 53%, 0.682 57%, 0.734 59.5%, 0.783 62.2%, 0.826 64.8%, 0.863 67.5%, 0.899 70.7%, 0.93 74%, 0.954 77.5%, 0.973 81.2%, 0.987 85%, 0.995 89.2%, 1);
/* Cubic-bezier approximation: */
transition: transform 600ms cubic-bezier(0.65, 0, 0.35, 1);Exact CSS
linear() draws any curve with straight segments. This one uses 26 points chosen so the motion never strays more than 0.25 % from the real easeInOutCubic; every current browser supports it.
linear(0, 0.004 9.7%, 0.019 16.7%, 0.049 23%, 0.07 26%, 0.096 28.8%, 0.131 32%, 0.171 35%, 0.217 37.8%, 0.269 40.7%, 0.325 43.3%, 0.385 45.8%, 0.447 48.2%, 0.585 53%, 0.682 57%, 0.734 59.5%, 0.783 62.2%, 0.826 64.8%, 0.863 67.5%, 0.899 70.7%, 0.93 74%, 0.954 77.5%, 0.973 81.2%, 0.987 85%, 0.995 89.2%, 1)
Questions
What is easeInOutCubic as a cubic-bezier?
The usual fit is cubic-bezier(0.65, 0, 0.35, 1). It strays from the true easeInOutCubic by up to 1 % of the distance travelled; for the exact curve use the CSS linear() value on this page, which stays within 0.25 %.
When should I use easeInOutCubic?
Panels, cards, page transitions and most product-film moves. Most motion systems' default sits close to it. An ease-in-out speeds up and slows down symmetrically. Use it for objects that move from one resting place to another while staying on screen.
The rest of the cubic family
Compare with
Animate with easeInOutCubic in Kineform
Pick it from any key, text animator or camera move, or bend it in the graph editor — on a real-time engine with 3D, light, type and video.