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?
start=parseInt(thisLayer.text.sourceText="0");
You can type whatever number you want in the quotations
end=parseInt(text.sourceText);
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
With a bit more code you can add a comma after the 1 so your text appears as "1,000" instead of "1000". Thanks to Nick Khoo for showing the world how to do that! You can see his method here.
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 for After Effects 2019
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!
In a previous post I cover some of the basics for creating a .csv file and how to use it in After Effects 2019. Today I’d like to share expressions for working with data; some of them utilize the new Javascript expressions engine in After Effects 2019. Hopefully these will spark your imagination to see what’s possible with data-driven animations!
Marissa Joyner
Author