easeInOutQuad
Progress grows with the square of time. A soft, natural ease that reads as 'physical' without being dramatic. 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 0.5 % off). The CSS linear() value and the JavaScript function are exact.
/* Exact curve (all modern browsers): */
transition: transform 600ms linear(0, 0.008 6.2%, 0.031 12.5%, 0.07 18.7%, 0.125 25%, 0.201 31.7%, 0.296 38.5%, 0.402 44.8%, 0.571 53.7%, 0.661 58.8%, 0.753 64.8%, 0.83 70.8%, 0.87 74.5%, 0.903 78%, 0.933 81.7%, 0.957 85.3%, 0.976 89%, 0.989 92.7%, 0.997 96.3%, 1);
/* Cubic-bezier approximation: */
transition: transform 600ms cubic-bezier(0.45, 0, 0.55, 1);Exact CSS
linear() draws any curve with straight segments. This one uses 20 points chosen so the motion never strays more than 0.25 % from the real easeInOutQuad; every current browser supports it.
linear(0, 0.008 6.2%, 0.031 12.5%, 0.07 18.7%, 0.125 25%, 0.201 31.7%, 0.296 38.5%, 0.402 44.8%, 0.571 53.7%, 0.661 58.8%, 0.753 64.8%, 0.83 70.8%, 0.87 74.5%, 0.903 78%, 0.933 81.7%, 0.957 85.3%, 0.976 89%, 0.989 92.7%, 0.997 96.3%, 1)
Questions
What is easeInOutQuad as a cubic-bezier?
The usual fit is cubic-bezier(0.45, 0, 0.55, 1). It strays from the true easeInOutQuad by up to 0.5 % 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 easeInOutQuad?
Everyday UI motion: menus, tooltips, list items. A good default when cubic feels too strong. 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 quad family
Compare with
Animate with easeInOutQuad 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.