top of page

Timer Expression

Background Line UI

Clock, Dynamic, Time Based Animation

Timer Expression

This expression displays the current composition time in a clean MM:SS format with leading zeros for better readability.

This After Effects expression creates a timer that shows the current composition time in MM:SS format. It calculates minutes and seconds, ensuring each value has two digits by adding a leading zero when needed. This is useful for countdowns, timers, or tracking video duration in a clean, professional format without complex settings or additional plugins.

// Get the current time in minutes and seconds
var t = time;
var minutes = Math.floor(t / 60) % 60; // Minutes
var seconds = Math.floor(t) % 60; // Seconds

// Format the time as HH:MM:SS
var formattedTime = pad(minutes) + ":" + pad(seconds);
formattedTime;

// Function to add leading zero if number is less than 10
function pad(num) {
return (num < 10) ? "0" + num : num;
}

How to Use This Expression?

Create a Text Layer: Add a text layer to your composition.
Apply the Expression: Alt + Click (Windows) or Option + Click (Mac) the stopwatch icon for the Source Text property of the text layer.
Paste the Expression: Copy and paste the provided code into the expression editor.
Adjust the Timer: This expression automatically starts the timer from 00:00 and counts upward. If you want to adjust the starting time, modify var t = time; by adding a value like var t = time + 30; to start from 30 seconds.
Preview the Timer: Play the composition to see the time counter in action.

Support Our Mission to Keep It Free

Your contribution ensures ongoing access to high-quality, easy-to-use After Effects expressions and libraries for

everyone.

Trending
Free After Effects Tutorials & Templates

As one of YouTube's leading creators of Motion Graphic Tutorials, we provide a diverse array of resources, including After Effects templates, royalty-free sound effects, and Photoshop PSD Templates. We also offer premium After Effects Templates and Sound Effects, designed to meet the needs of both beginners and professionals in the Motion Graphics field.

Copyright © 2025 Avnish Parker.

All Rights Reserved.

Follow Us

  • Youtube
  • Grey Facebook Icon
  • Twitter
  • Instagram
  • Patreon_logo_Small_edited_edited
Online Payment Icons
bottom of page