Generate a Random Number

There are so many reasons why you might need to generate a random number in Notion. You might want to display a “Movies to watch next” list and present the movies in a random order. Or you might want to display random quotes from a database. Whatever your reason might be, here is a solution.

substring(format(toNumber(substring(format(timestamp(now())), 8, 9) + substring(format(timestamp(now())), 1, 2) + substring(format(timestamp(now())), 7, 8)) * toNumber(prop("Rand Datetime"))), 8, 11)

We solve Notion’s no rand() problem by using numbers extracted from a now() timestamp in chaotic order, then multiplied by another random datetime and extracted numbers again.

“Rand Datetime” is just a random date that you supply rather than using “Created Date” or “Edited Date”. It keeps each random value completely unique.

To use, apply this formula to a column in your database, then sort by that column.

Duplicate Notion template


Don't go solo. Navigate all the complexities of life with your Sidekick. Now available

Get in Touch
close slider

    Get in Touch

    Have a question or comment? Don't hesitate to reach out!


    Please note that I do not respond to cold outreach, requests for free stuff, or anything else that I deem sketchy or scammy