View all expressions
Transformation

Dynamic Number Counter without Keyframes

This expression automatically animates a number from a defined start value to an end value over a set duration. It begins at the layer’s inPoint and allows control over the animation speed and decimal precision.

Contributed by:


startValue = 0; // Change this value if needed
endValue = 99.99; // Change this value if needed
animationDuration = 2; // Duration of animation in seconds
decimals = 2; // Number of decimal places
startTime = inPoint;
endTime = startTime + animationDuration;
t = clamp(time, startTime, endTime);
animatedValue = linear(t, startTime, endTime, startValue, endValue);
decimals = Math.round(decimals);
roundedValue = animatedValue.toFixed(decimals);
roundedValue;

Dynamic Number Counter without Keyframes

Practical use case

Ideal for UI animations, statistics, financial data, and countdowns where a number needs to animate smoothly without manual keyframing.

Check out similar expressions

Data-driven video workflows for After Effects are easier with Plainly.

a mesh of elegant lines transparent image