# Delta Time

> How long the last frame took. Multiply moves by it to keep speed fair.

**Field:** Software Development  
**Category:** Game Development  
**Also known as:** Frame Time, deltaTime, dt

## Think of it like

Think of it like walking by the clock, not by steps. You get there on time, fast legs or slow.

## Definition

Delta time is how long the last frame took, often a tiny part of a second. Games multiply each move by it. So a car set to 200 pixels a second moves the same speed on a fast computer and a slow one. Without it, the game runs faster on faster machines. Engines hand it to your code on every pass of the loop.

## Example

Emma's car moves too fast on her new laptop. She multiplies the speed by delta time, and it is right on both.

## Example code

```python
speed = 200  # pixels per second
x += speed * dt
```

Multiply by dt, and the car moves 200 pixels each second on any computer.

## Why it matters

Players have fast and slow computers. Delta time makes the game feel the same for all of them.

## Common mistake

Moving things a fixed amount each frame. The game then runs at a different speed on each computer.

## Three principles

- **Time per frame.** It is how long the last frame took.
- **Multiply moves.** Speed times delta time gives the step.
- **Fair on all machines.** The game runs at the same speed everywhere.

## Related terms

- [Game Loop](https://learn.benibix.com/term/development/game-loop)
- [Physics Engine](https://learn.benibix.com/term/development/physics-engine)
- [Frame Rate](https://learn.benibix.com/term/design/frame-rate)

![Three boxes in a loop: 1, read input from keys, mouse and touch; 2, update, lit up, move by speed times delta time; 3, draw one new frame; then back to the start, about 60 times a second. Below, a fast computer at 60 loops a second moves 200 times 1/60 of a second, 3.3 pixels per loop, and a slow computer at 30 loops a second moves 6.7 pixels per loop. A note says both move 200 pixels each second because each step uses delta time.](https://learn.benibix.com/diagrams/dev2-game-loop.svg)

---

Source: https://learn.benibix.com/term/development/delta-time
Author: Behnia Zarei (a developer in Vienna, Austria, who builds and teaches data, AI and business intelligence at BENIBIX)
Publisher: BENIBIX Learn (https://learn.benibix.com/)
Last updated: 2026-11-17
Licence: CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). Quote freely with attribution.
