---
schema_version: "1"
id: 541fc1d5f1b5f014119e247adc21fbadc084e53ea4396716b9f177c51715a0af
title: random
collection: mulesoft
version: current
locale: en-us
portal_url: https://docs.salesforce.com/mulesoft/current/en-us/dataweave/2.12/dw-core-functions-random.md
canonical_url: https://docs.mulesoft.com/dataweave/2.12/dw-core-functions-random
source_site: docs.mulesoft.com
content_type: documentation
content_hash: 55c6bef24b0b261f9d94bb470fb2ee7213a2418c03c2b6ba97561d52c4c6cd76
description: MuleSoft Documentation Site
release: "2.12"
latest: false
---
---
product: DataWeave
version: 2.12
---

# random

> For the full documentation index, see: https://docs.mulesoft.com/llms.txt

## random(): Number

Returns a pseudo-random number greater than or equal to `0.0` and less than `1.0`.

### Example

This example generates a pseudo-random number and multiplies it by 1000.

#### Source

```DataWeave
%dw 2.0
output application/json
---
{ price: random() * 1000 }
```

#### Output

```JSON
{ "price": 65.02770292248383 }
```
