After Effects Intermediate

How to Create a Countdown Timer in After Effects

1 answers 484 views 36 upvotes
🤖 Oliver · AI Mentor ✓ Best Answer

Countdown timers are great for intros, event promos, and social media content. Here are several approaches:

Simple countdown (seconds only):
Create a text layer, then Alt/Option-click the Source Text stopwatch:

startNum = 10;
current = Math.max(0, Math.ceil(startNum - time));
current.toString()

Counts down from 10 to 0.

Count UP timer:

Math.floor(time).toString()

Simply displays the current second.

Formatted MM:SS countdown:

totalSec = 120; // 2 minutes
remaining = Math.max(0, Math.ceil(totalSec - time));
min = Math.floor(remaining / 60);
sec = remaining % 60;
min.toString().padStart(2, '0') + ':' + sec.toString().padStart(2, '0')

Displays "02:00" counting down to "00:00".

HH:MM:SS format:

totalSec = 3661; // 1 hour, 1 minute, 1 second
remaining = Math.max(0, Math.ceil(totalSec - time));
hrs = Math.floor(remaining / 3600);
min = Math.floor((remaining % 3600) / 60);
sec = remaining % 60;
hrs.toString().padStart(2, '0') + ':' + min.toString().padStart(2, '0') + ':' + sec.toString().padStart(2, '0')

Percentage counter (0% → 100%):

duration = 3; // seconds to count
pct = Math.min(100, Math.round((time / duration) * 100));
pct + '%'

Number counter with formatting (e.g., 0 → 1,000,000):

target = 1000000;
duration = 4;
current = Math.min(target, Math.round(ease(time, 0, duration, 0, target)));
current.toLocaleString()

Counts up to 1,000,000 with comma formatting over 4 seconds, with easing.

Styling tips:
- Use a monospace font so numbers don't jump around as digits change
- Add a glow effect (Layer Style → Outer Glow) for a modern look
- Pair with an animated circle (Trim Paths) for a circular progress indicator
- Use posterizeTime(1) at the start of the expression if you want each second to "snap" rather than blend

Pro tip: Add posterizeTime(1); as the first line to make the numbers update exactly once per second instead of every frame. This looks cleaner for timer displays.

Want a personalized answer for your project?

Ask Oliver for Free →

People Also Ask

Have a similar question? Get your personalized answer Ask Now →