Animate Numbers Counting Up in After Effects
Learn how to animate numbers counting up in After Effects with just a text layer and some expressions code- no keyframing required!
There are several different methods for animating numbers counting up in After Effects. You can use slider controls and even the Numbers effect but the method below is by far my favorite and will soon become part of all our infographics templates.
In this post you'll learn how to animate numbers counting up with a Text layer and no keyframes. The expressions code might look a little long but I promise it’s not too difficult to follow.
Let's Get Started
For this example we’ll animate a number from 0 to 1000 by applying this nifty expression to animate with no keyframes!
Step 1: Create a text layer and type “1000”.
Step 2: Hold the Alt or Option key while clicking on the stopwatch for the Text layer’s Source Text property
Step 3: Paste this code in the expressions editor:
What does this all mean exactly?
You can type whatever number you want in the quotations
The “ending” number is whatever text you type for the actual text layer
val=Math.round(easeOut(time, startTime, 4,start, end));
The last line basically says “as time elapses from the Start of the layer to a number you specify representing seconds, the number will animate from the number in quotations to the number typed in the text layer.
Automatically Add a Comma to the Animated Numbers
Below we’ve added a part of his code to our expression:
So, what if you want 2 commas?
A YouTuber left a comment on Nick Khoo’s video that worked that all out:
Hopefully that little bit of code comes in handy next time you need to do the ever so boring task of animating numbers!
Also in FluxVFX
Data-driven expressions are a powerful way to easily make infographics templates from spreadsheets in After Effects and export for use in Premiere Pro! I recently worked with Adobe Stock to create data-driven templates available to download *for free* here!