---
title: "random between · RUAL Documentation"
description: "Generates a random number between, including, the given two numbers. This number will be an integer (e.g. 1, 2, 3) without decimals."
canonical: https://docs.rual.nl/block-types/number/number_random_between
language: en
---

# random between

This block is part of the [`number`](https://docs.rual.nl/block-types/number) group and was last modified in core [`v10.4.28`](https://docs.rual.nl/core-versions/100428).

Generates a random number between, including, the given two numbers. This number will be an integer (e.g. 1, 2, 3) without decimals.

- min required `number`

- max required `number`

- number `number`

- success `condition`

- error `value`

A typical wiring for [random between](https://docs.rual.nl/block-types/number/number_random_between): [number](https://docs.rual.nl/block-types/number/number_default) feeds the `number_0` pin; [number](https://docs.rual.nl/block-types/number/number_default) feeds the `number_1` pin; the `number` out pin feeds [substring](https://docs.rual.nl/block-types/value/value_substr).

![Studio canvas example for the random between block: typical wiring for random between.](https://docs.rual.nl/canvas-examples/number_random_between.png)

### Commonly used with

In production blueprints, this block is most often wired together with:

- [number](https://docs.rual.nl/block-types/number/number_default): feeds into this block. Generates a valid number from the filled custom value in the blueprint.

- [substring](https://docs.rual.nl/block-types/value/value_substr): this block feeds into it.

- [set fields](https://docs.rual.nl/block-types/mutations/mutations_set_bp_field_multiple): this block feeds into it. Generates an array of mutations based on the given filled fields.

- [get at index](https://docs.rual.nl/block-types/array/array_get_at_index): this block feeds into it. Returns the element stored at the given zero-based index. An index outside the array, or an element that is null, outputs null.

- [cast to value](https://docs.rual.nl/block-types/type%20casting/number_convert_to_value): this block feeds into it. Converts the given number into a value.

### Version history

Introduced in [`v10.4.28`](https://docs.rual.nl/core-versions/100428).
