Time
- Author:
- Denis Stefanides
- Category:
- Time
Expression Code
time * 100Where to Apply
Apply this expression to:
- Rotation
- Position (X or Y separately)
- Scale (individual axes)
- Opacity (used with extra math like sine)
How It Works
time * 100
// Multiplies the current comp time (in seconds) by 100
// So the value increases by 100 every second
// You can replace 100 with any number to control speedThe time expression tracks how many seconds have passed in your composition. So when you multiply time by a number, you're creating a value that grows steadily over time.
For example:
- At 0 seconds → value =
0 - At 2 seconds → value =
200(if usingtime * 100)
This is perfect for making things move or change automatically, without setting any keyframes.
Time Expression on Position
[value[0] + time * 100, value[1]]
// Moves layer to the right over time
// Adds 100 pixels every second to X (horizontal position)
// Keeps Y (vertical) position unchangedTime Expression on Rotation
time * 45
// Rotates the layer 45 degrees per second
// Change 45 to go faster or slowerTime Expression on Opacity (with pulsing effect)
Math.sin(time * 2) * 50 + 50
// Creates a looping sine wave
// Opacity goes between 0 and 100
// Sine outputs values from -1 to 1 → scaled to 0–100Time Expression on Scale (slow zoom effect)
[ value[0] + time * 10, value[1] + time * 10 ]
// Gradually increases both width and height
// Adds 10 units to X and Y scale every second
// Keeps the aspect ratio steadyFrequently asked questions
How do I use the expression on this page?
Just copy the full expression code from the top of this page. Then Alt-click (or Option-click on Mac) the stopwatch on the property you want to animate. Paste the code into the editor and that's it. If you’re not sure which property to use, check the "Where to Apply" section above.
The expression isn’t working. What should I check?
First, make sure your project is using the JavaScript engine (go to File > Project Settings > Expressions). Also double-check for missing characters, and see if the code requires parenting a layer. If so, there will be a comment in the code explaining what needs to be connected.
I’m not sure what the expression does. Where can I learn more?
Take a look at the "How It Works" section on this page. It explains each part of the expression in plain language so you can understand how everything works together.
Can I customize how the expression behaves?
Yes, absolutely. Most expressions include easy-to-edit variables near the top and comments that guide you on what to change. You can also link sliders or checkboxes using Expression Controls if you want more control in the timeline.
Can I apply this to other properties too?
Yes, you can use it on any property with a stopwatch. That includes Position, Scale, Opacity, and also effect settings like Blur or Tint.
Will it work in comps with different frame rates or sizes?
In most cases, yes. These expressions are designed to adapt to your comp’s resolution and frame rate. If anything specific needs adjusting, it’ll be noted in the code or in the "How It Works" section.
Related Expressions

Pulse Opacity
Creates a smooth pulse that fades opacity between a minimum and maximum value you set, so it never fully disappears unless you want it to.

Start/End Expression at Specific Time
Run any animation or behavior (like wiggle or anything else) between two specific times inside After Effects.

Posterize Time
Lock a property to a specific frame rate so it updates at a fixed interval, perfect for stuttery or stop-motion effects.

Digital Clock
Create a real-time digital clock in After Effects that updates every second using just an expression.