---
title: "__Random"
description: "JMeter __Random function reference: syntax, parameters, and practical examples for parameterizing test plans with dynamic values."
url: https://docs.jmeter.ai/functions/random/
lastUpdated: 2026-10-01
source: docs.jmeter.ai
---

# __Random

*Also documented in context in the [full Functions and Variables reference](/user-manual/functions/#__Random).*

**TL;DR:** `__Random` returns a random integer between a min and max value — the simplest way to add variety to a request (random product ID, random delay, random page number) without a CSV file.

The random function returns a random number that lies between the given min and max values.

| Name | Required | Description |
| --- | --- | --- |
| Minimum value | Yes | A number |
| Maximum value | Yes | A bigger number |
| Variable Name | No | A reference name for reusing the value                 computed by this function. |

Examples:

```bash
\${__Random(0,10)}
```

will return a random number between 0 and 10

```bash
\${__Random(0,10, MYVAR)}
```

will return a random number between 0 and 10 and store it in `MYVAR`. `\${MYVAR}` will contain the random number

### Example

```plaintext
${__Random(0,10)}            → a random number between 0 and 10
${__Random(1000,9999,pin)}   → stored in variable "pin" too
```

For weighted or larger datasets, a [CSV Data Set Config](/components/csv-data-set-config/) usually models real traffic more accurately than a uniform random range.

## Related

- [Functions and Variables Guide](/topics/functions-and-variables/)
- [Regex Extractor Builder](/tools/regex-tester/)
- [CSV Data Set & Parameterization](/topics/csv-data-set-config-guide/)
- [Full Functions Reference](/user-manual/functions/)
- [Component Reference](/user-manual/component-reference/)
