Skip to Content
Sindre Sorhus
Back to Randa

Updated

How to Generate a Random Number on Mac

By Sindre Sorhus, who makes the Randa app

With Randa

  1. Open Randa. Its small window shows the minimum and the maximum, like 1 and 100.
  2. Type the minimum and the maximum of your range, like 1 and 6 for a die.
  3. Press Return, or click “Generate”. Press it again for the next number.

Both the lowest and the highest number can come. To copy the number, press ShiftCommandC. To keep the window above your other windows, like during a game, choose “Window › Stay on Top” (ControlCommandT).

Tips

  • For a yes or no decision, like a coin flip, use 0 and 1.
  • To pick from a list, like the winner of a draw, use 1 and the number of items, and take the item at that position.
  • To never get the same number two times in a row, turn on “Consecutively unique numbers” in the settings.

Randa is free, and also works on iPhone, iPad, Apple Watch, and Apple Vision Pro. On iPhone, see how to generate a random number on iPhone.

Get Randa

Generate random numbers

Download on the App Store

Free

Requires
macOS, iOS, watchOS, or visionOS 26 or later
Updated
January 2026
US App Store rating
5.0/5 (12 ratings)

More about Randa

Without an app

Shortcuts: Make a shortcut with the “Random Number” action:

  1. Open the Shortcuts app, click the add button, and add the “Random Number” action.
  2. Set the minimum and the maximum in the action.
  3. Add the “Show Content” action, and click the run button.

Terminal: This command prints a random number from 1 to 100. Change the last two numbers for another range:

Terminal
jot -r 1 1 100

The Shortcuts way works well when you always use the same range. Randa is faster when the range changes.