# Prediction: pending property

> The pending read-only property of the Prediction interface counts the ticks the prediction has stepped ahead of the room's state.

The **`pending`** read-only property of the [`Prediction`](/docs/client/prediction) interface is the number of ticks the prediction has stepped ahead of the room's state: inputs sent and not yet acknowledged, and idle ticks not sent.

## Value

A number from 0 to 64.

## Description

With `sample`, `pending` stays at about 2 plus half the round trip in ticks, and never reaches 0, because inputs are sent ahead of the room's clock. To tell that the prediction has caught up with the room, read [`settled`](/docs/client/prediction/settled) instead.

Idle ticks, those whose input `idle` says means the same as none, are dropped only when a state update arrives. In a room where nothing changes, no update comes, so `pending` climbs to 64 and stays there.

## Examples

### Showing input lag in a debug overlay

A debug overlay shows how many ticks the player runs ahead of the room, and the round trip that sets it.

```ts
// overlay.ts
import type { Prediction, RoomClient } from "@irtio/client";

export function overlayText(room: RoomClient, me: Prediction<unknown>): string {
  return `ahead ${me.pending} ticks, rtt ${Math.round(room.rtt)} ms, ${me.settled ? "settled" : "catching up"}`;
}
```

## See also

- [`Prediction.settled`](/docs/client/prediction/settled)
- [`Prediction.tick`](/docs/client/prediction/tick)
- [Idle inputs](/docs/client/guides/prediction#idle-inputs)
