easeInOutBack
Overshoots the target (or pulls back before leaving) by about 10 % with the classic constant 1.70158, giving a little anticipation or settle. 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 3.6 % off). The CSS linear() value and the JavaScript function are exact.
/* Exact curve (all modern browsers): */
transition: transform 600ms linear(0, -0.003 2.7%, -0.014 5.7%, -0.079 17%, -0.098 21.8%, -0.1 24.5%, -0.095 27%, -0.084 29.3%, -0.066 31.5%, -0.032 34.2%, 0.014 36.8%, 0.072 39.3%, 0.144 41.8%, 0.227 44.2%, 0.316 46.3%, 0.411 48.3%, 0.554 51%, 0.63 52.5%, 0.713 54.3%, 0.786 56.2%, 0.861 58.3%, 0.928 60.7%, 0.982 63%, 1.027 65.5%, 1.062 68.2%, 1.085 70.8%, 1.097 73.7%, 1.1 76.7%, 1.095 79.3%, 1.083 82.3%, 1.013 94.7%, 1.003 97.5%, 1);
/* Cubic-bezier approximation: */
transition: transform 600ms cubic-bezier(0.68, -0.6, 0.32, 1.6);Exact CSS
linear() draws any curve with straight segments. This one uses 33 points chosen so the motion never strays more than 0.25 % from the real easeInOutBack; every current browser supports it.
linear(0, -0.003 2.7%, -0.014 5.7%, -0.079 17%, -0.098 21.8%, -0.1 24.5%, -0.095 27%, -0.084 29.3%, -0.066 31.5%, -0.032 34.2%, 0.014 36.8%, 0.072 39.3%, 0.144 41.8%, 0.227 44.2%, 0.316 46.3%, 0.411 48.3%, 0.554 51%, 0.63 52.5%, 0.713 54.3%, 0.786 56.2%, 0.861 58.3%, 0.928 60.7%, 0.982 63%, 1.027 65.5%, 1.062 68.2%, 1.085 70.8%, 1.097 73.7%, 1.1 76.7%, 1.095 79.3%, 1.083 82.3%, 1.013 94.7%, 1.003 97.5%, 1)
Questions
What is easeInOutBack as a cubic-bezier?
The usual fit is cubic-bezier(0.68, -0.6, 0.32, 1.6). It strays from the true easeInOutBack by up to 3.6 % 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 easeInOutBack?
Playful UI, badges popping in, icons and stickers. Avoid it on large surfaces where the overshoot reads as a glitch. 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.
How much does easeInOutBack overshoot?
It passes the target by 10 % of the distance before settling — about 20 px on a 200 px move.
Does easeInOutBack move backwards first?
Yes: it pulls back 10 % of the distance before setting off — an anticipation.
The rest of the back family
Compare with
Animate with easeInOutBack 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.