Summer Pricing · 30% off everything · Ends August 1 · Shop the sale

Summer Pricing is Here

30% off every plugin and course through August 1.

Shop Now
30% off Summer Pricing · Ends Aug 1

By Destin Jordan

After Effects Expressions: 7 You Can Use Without Code

Most After Effects users avoid expressions entirely. The idea of writing code inside a motion graphics tool sounds like the wrong tool for the job. But the most useful expressions in After Effects are not code. They are one-liners you paste into a property field and never think about again. No JavaScript knowledge required. No programming background. Just a short string of text that automates something you were doing manually by hand.

These are the 7 expressions that save the most time in a real production workflow. For each one: what it does, the exact text to paste, and a practical example of when you would use it.

What Expressions Actually Are

Before the seven, a quick mental model. An expression is a small script that controls the value of a property in After Effects over time. Instead of manually setting keyframe values, you write an expression that calculates the value automatically based on rules you define.

To add an expression to any property: hold Alt (Windows) or Option (Mac) and click the stopwatch next to the property name. A text field appears where you type or paste your expression. The property value is now driven by the expression instead of by keyframes.

To remove an expression: hold Alt/Option and click the stopwatch again. The expression field disappears and the property returns to normal keyframe behavior.

That is the entire mechanic. The rest is just knowing which expressions to use.

1. wiggle - Random, Organic Motion

What it does: Adds continuous, randomized movement to any property. Position, rotation, scale, opacity, a camera. Any property you can apply it to, it will shake or oscillate randomly within the parameters you set.

The expression:

wiggle(frequency, amplitude)

Practical parameters: Replace frequency with how many times per second the property changes, and amplitude with how far it moves in the property's unit. For position on a 1080p comp, a subtle camera shake is wiggle(2, 5). An aggressive shake is wiggle(8, 30).

When to use it: Handheld camera feel on a static shot. A floating UI element that needs to feel alive. A value counter that trembles under pressure. Any motion that needs organic randomness rather than the mechanical feeling of manually drawn keyframes.

Practical example: Apply wiggle(3, 8) to a camera's position property on a dramatic interview cut. The comp suddenly feels like it was shot on a shoulder rig instead of a locked tripod.

2. loopOut - Make Any Animation Loop Forever

What it does: Takes keyframe animation you have already built and loops it indefinitely past the last keyframe. No duplicating keyframes. No extending the timeline. One expression added after the fact, and the animation repeats forever.

The expression:

loopOut("cycle")

When to use it: Looping motion graphics elements. A loading indicator that spins. A badge that pulses. A background element that scrolls continuously. Any animation you want to play on repeat without building a longer sequence of keyframes.

Variations:

  • loopOut("pingpong") plays forward then plays backward, creating a back-and-forth loop instead of a reset-and-repeat loop. Useful for subtle breathing or oscillation effects.
  • loopIn("cycle") does the same thing but looping before the first keyframe rather than after the last.

Practical example: Build a rotation animation from 0 to 360 degrees over 1 second. Add loopOut("cycle") to the rotation property. The element spins continuously for the entire duration of the comp without any additional keyframes.

3. time * speed - Constant Speed Without Keyframes

What it does: Drives a property based on the current time in the composition. The value increases continuously from the start of the comp to the end, at a speed you control. No keyframes at all.

The expression:

time * 30

Replace 30 with any number. For rotation, time * 30 means the layer rotates 30 degrees per second. For position, time * 100 means the layer moves 100 pixels per second to the right.

When to use it: A continuously rotating icon. A background that scrolls at a constant speed. A counter that counts up at a defined rate. Any property that needs linear, continuous change from the start of the comp to the end.

Practical example: Add time * 45 to the rotation property of a clock's second hand graphic. It rotates at exactly 45 degrees per second without a single keyframe.

4. random - Unpredictable Values Within a Range

What it does: Returns a random value between two numbers. Unlike wiggle, which continuously fluctuates, random generates a single value that stays fixed until you tell it to change. Useful for randomizing properties across multiple layers at once.

The expression:

random(minValue, maxValue)

When to use it: You have 20 particles in a composition and you want each one to have a slightly different opacity. Apply random(40, 90) to the opacity property. Each layer evaluates the expression independently and gets its own random value, giving you instant visual variation across the set without manually setting 20 different values.

Important note: By default, random gives you a new value every frame, which looks like noise. To lock the random value to a single result for the duration of the comp, use seedRandom(index, true); random(40, 90). The index uses the layer's own number as the random seed, so each layer gets a different but stable value.

Practical example: A grid of cards that each need slightly different scale values to feel hand-placed rather than programmatically aligned. Apply seedRandom(index, true); random(95, 105) to the scale of each card. Each one gets a fixed unique scale between 95% and 105%, breaking the mechanical uniformity.

5. valueAtTime - Reference a Property's Value at Any Point in Time

What it does: Reads the value of a property at a specific timestamp, even if you are currently at a different point in the timeline. This lets you drive one layer's behavior based on where another layer was at a completely different moment.

The expression:

thisComp.layer("Layer Name").transform.position.valueAtTime(0)

Replace "Layer Name" with the actual layer name and 0 with the time in seconds you want to sample.

When to use it: A trail effect where elements follow the same path another element took 0.5 seconds earlier. A reveal effect where the end state of an animation should match the exact position of a different object at a defined moment. Anything that requires one object to "remember" where something else was.

Practical example: A dotted trail following a moving ball. Apply the ball's position value to each trail dot's position property using valueAtTime(time - 0.1), valueAtTime(time - 0.2), etc. for each successive dot. Each dot follows exactly where the ball was, with a staggered delay.

6. toWorld - Convert Local Coordinates to Comp Coordinates

What it does: Converts a point in a layer's local coordinate space to the equivalent point in the composition's world coordinate space. Sounds technical. In practice, it solves one specific common problem: a child layer or a layer inside a pre-comp is in a different coordinate space from the rest of your composition, and you need to connect it to something outside.

The expression:

thisComp.layer("Layer Name").toWorld(thisComp.layer("Layer Name").transform.anchorPoint)

When to use it: You have a text label that should always sit at the exact screen position of a 3D object that is moving in 3D space. The 3D object is in world space. Your 2D text layer is in screen space. toWorld translates the 3D point to a 2D position your text layer can follow.

Practical example: A data visualization where labels need to track moving data points. The points move in 3D space. The labels are 2D. Without toWorld, the label positions are calculated in the wrong coordinate system and drift off the points as the camera moves.

7. linear - Map One Value Range to Another

What it does: Takes a value that moves between two numbers (an input range) and maps it to a completely different pair of numbers (an output range). It linearly interpolates between the output values as the input moves through its range.

The expression:

linear(t, startInput, endInput, startOutput, endOutput)

When to use it: You want opacity to go from 0 to 100 as the playhead moves from second 1 to second 2, without manually setting keyframes. Or you want a layer to scale from 80% to 120% as audio amplitude moves from quiet to loud. Any situation where you want one thing to drive another thing, proportionally, with defined start and end points.

Practical example:

linear(time, 1, 3, 0, 100)

Applied to opacity, this fades a layer from 0% to 100% between 1 second and 3 seconds into the comp, with zero keyframes. The layer is fully transparent before 1 second and fully opaque after 3 seconds.

The closely related ease() function works the same way but produces an ease-in/ease-out curve instead of a straight linear ramp. Use ease() when you want the interpolation to feel smooth rather than mechanical.

Where to Go From Here

These seven expressions cover the majority of what most motion graphics projects actually need. Wiggle handles organic movement. loopOut handles repeating animation. time drives constants. random handles variation. valueAtTime, toWorld, and linear handle the more complex linkage situations.

The pattern behind all of them: you are removing manual work. Instead of setting 50 keyframes to simulate a shake, wiggle does it in 15 characters. Instead of duplicating a 60-frame loop 10 times, loopOut does it in one line.

The more you work with expressions, the more you start seeing your entire project as a series of relationships between properties, rather than a series of manually set values. That mental shift is where the real efficiency gains happen.

EssentialFX automates many of these patterns through its panel interface. The Speed Ramp Controller, the Shake Controller, and the Graph Curves library eliminate the need to write any expressions manually for the most common motion tasks in commercial editing work. For projects that go beyond those patterns, the expressions above are your foundation.

Stop Building What Already Exists

EssentialFX ($247) gives you a panel inside After Effects with pre-built controllers for speed ramps, camera shake, graph curves, and more. No expressions to write. No manual keyframing. One click.

If you want the full system, The Total Editing Experience ($897) combines EssentialFX with a complete video editing course. Every technique you need from raw footage to final export.

Get EssentialFX - $247 Get the Full Bundle - $897

Instant access. Works inside After Effects. One-time payment.

Premium Shopify Theme

Ready to build your store?

Obsidian is the premium dark Shopify theme built for digital product creators. 47 custom sections. 7 color presets. One-time $349.

View Obsidian Theme See Live Demo