Updated
How to Generate a Random Number on Mac
By Sindre Sorhus, who makes the Randa app
With Randa
- Open Randa. Its small window shows the minimum and the maximum, like 1 and 100.
- Type the minimum and the maximum of your range, like 1 and 6 for a die.
- 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 (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
Free
- Requires
- macOS, iOS, watchOS, or visionOS 26 or later
- Privacy
- No data collected
- Updated
- January 2026
- US App Store rating
- 5.0/5 (12 ratings)
Without an app
Shortcuts: Make a shortcut with the “Random Number” action:
Terminal: This command prints a random number from 1 to 100. Change the last two numbers for another range:
jot -r 1 1 100
The Shortcuts way works well when you always use the same range. Randa is faster when the range changes.
