Happy Holidays United States Sale! Jan 31st Only! Save 50% Sitewide!
Special Offer Buy Every Package for $8412 $149
You save $8263 (99% off)

Format Numbers in After Effects

How to format numbers in After Effects?

    1. Create a text layer.
    2. Add a Slider Control to the text layer and rename it to Number.
    3. Alt-click on the Source Text property and paste the expressions below.
// slider with a number
var number = parseFloat(effect("Number")("ADBE Slider Control-0001"))
var multiplier = 1; // change the value to 10, 100 etc. 
number = number * multiplier;
var prefix = "$"; // sign before the number
// sign between numbers (you can put a space or comma)
var separator = "."; 
var postfix = ""; // sign after the number

var string = number.toFixed(0)  + "";

"$" + 
string.replace(/(\d)(?=(\d\d\d)+([^\d]|$))/g, '$1' + 
separator) + postfix;
  1. Create 2 keyframes on the slider with 0 and 1000000 values.

How does it work?

The expression uses a regular expression to search for the number pattern and modifies it. You can learn more about regular expressions at https://en.wikipedia.org/wiki/Regular_expression

How to make a number bigger than 1,000,000?

Change the multiplier variable to 10, 100, etc.

How to change the dollar sign?

Change the prefix variable to any symbol, word or leave it blank like this “”.

How to add a word after the number?

Change the postfix variable.

Welcome to AEJuice Points
Become a member
With more ways to unlock exciting perks, this is your all access pass to exclusive rewards.
Already have an account? Sign in
AEJuice Points
Earn more AEJuice Points for different actions, and turn those points into awesome rewards!
Give your friends a reward and claim your own when they make a purchase.
They get
$15 off discount
You get
$15 off discount
AEJuice Points
Share on Facebook
3 Points
Like on Facebook
1 Point
Follow on Instagram
1 Point
Place an order
3 points for every $100 spent
Celebrate a birthday
2 Points
Ways to spend
Use at checkout
1 Point = $1
Use your points at checkout with any purchase. Points will not expire.