# Prediction: mispredictions property

> The mispredictions property of the Prediction interface counts the replays that found a field the stepper writes different.

The **`mispredictions`** property of the [`Prediction`](/docs/client/prediction) interface is how many replays found the room's state different from the prediction in a field the stepper writes.

## Value

A number, 0 when the prediction starts. The prediction adds 1 for each replay that mispredicts. Setting it, such as to 0 at the start of a round, sets the count it adds to.

## Description

A field no step writes, such as a score only room code sets, is the room's: its changes never count. For the fields and sizes of each misprediction, use the [`mispredict` event](/docs/client/prediction/mispredict-event), and for a summary of recent ones, [`drift`](/docs/client/prediction/drift).

## Examples

### Counting mispredictions per round

A racing game logs how many times prediction missed in each race.

```ts
// race-stats.ts
import type { Prediction } from "@irtio/client";

export function endRace(me: Prediction<unknown>, race: number): void {
  console.log(`race ${race}: ${me.mispredictions} mispredictions`);
  me.mispredictions = 0;
}
```

## See also

- [`mispredict` event](/docs/client/prediction/mispredict-event)
- [`Prediction.drift`](/docs/client/prediction/drift)
