# Random number > Which number will chance pick? Fair random numbers from your device's secure generator, with or without repeats. Pick one or many random whole numbers between any two limits, with or without repeats, sorted if you like. Fair and unbiased, made in your browser. - Page: https://how.box/random-number/ - Runs entirely in the browser. - License: HowToolbox's own text and data (titles, explanations, FAQs, tool descriptions and schemas, this file) are CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/); AI training and answers are welcome. Attribute "HowToolbox (how.box)" with a link to the page used. Third-party data keeps its own terms; the name and logo are not licensed. Publisher: HowToolbox, contact@how.box. Terms: https://how.box/about/terms/ ## Inputs Answer link: https://how.box/random-number/?mode={mode}&min={min}&max={max}&n={n}&u={u}&s={s} - `mode` (numbers or coin): numbers or coin. Example: `numbers`. - `min` (whole number -1e9 to 1e9): Smallest number, an integer. Example: `1`. - `max` (whole number -1e9 to 1e9): Largest number, an integer. Example: `100`. - `n` (whole number 1 to 1000): How many numbers or flips, 1–1000. Example: `1`. - `u` (boolean): No repeats: 1 or 0. Example: `false`. - `s` (boolean): Sort ascending: 1 or 0. Example: `false`. Example answer: https://how.box/random-number/?mode=numbers&min=1&max=100&n=1&u=0&s=0 The page computes the answer in the browser: read results from the agent tools below, not from the page HTML. ## Agent tools - `random_number_generate`: Draws random integers between min and max (both included), or flips a fair coin, with the browser's cryptographically secure random generator (uniform, no modulo bias). - MCP, one POST to https://how.box/mcp: `{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"random_number_generate","arguments":{"mode":"numbers","min":1,"max":100,"count":1,"unique":false,"sorted":false}}}` - GET: https://how.box/mcp/run/random_number_generate?mode=numbers&min=1&max=100&count=1&unique=false&sorted=false ## How it works Every number between your limits is equally likely, and each draw is independent of the one before. Your device's built-in secure random generator supplies the randomness, the same one used for encryption keys, so nobody can predict or steer the result. Making the draw exactly fair takes care. Squeezing a large random value into a smaller range with a plain remainder favours the low numbers a little. This tool throws away the few values that would cause that, so a range of 1 to 6 gives each number exactly one chance in six (Lemire, ACM Transactions on Modeling and Computer Simulation, 2019). Without repeats, the numbers are dealt like cards from a shuffled deck, using the Fisher–Yates shuffle (Knuth, The Art of Computer Programming, vol. 2): every possible ordered selection is equally likely. A coin flip is a draw between two values, so heads and tails each have a one in two chance. The result is made in your browser and never sent anywhere. It is not part of the shared link, so a link repeats your settings, not your numbers. ## FAQ **Is it truly random?** It is as unpredictable as your device can make it. The numbers come from the operating system's secure generator, which gathers its randomness from hardware events, not from a simple formula. **Can the same number come up twice in a row?** Yes, unless you turn on No repeats. A fair draw has no memory, so a repeat is just as likely as any other number. **Can I use it for a prize draw or a lottery?** It is fine for friendly draws. For anything with legal rules, such as a public giveaway, follow the rules that apply to you, which often require a witness or a certified method. **Are the minimum and maximum included?** Yes. Both endpoints can be drawn, so 1 to 6 has six possible results. **Does sorting change the chance of a number?** No. Sorting only puts the numbers already drawn in ascending order. More: [HowToolbox index](https://how.box/llms.txt) · [Agent Skill](https://how.box/skill.md) · [agent terms](https://how.box/about/agents/)