How to get a random number from Google omnibar?

Is there any command to get a random number from omnibar?

E.g. like how we can type `21 + 56` and it will show `77`:

-

migrated from superuser.comJun 13 '11 at 16:22

This question came from our site for computer enthusiasts and power users.

`flip a coin` to roll a 2-sided dice or

`roll a dice` to roll a 6-sided die.

The numbers returned are generated randomly - and probably the closest you'll get to a random number generated by Google. As other answers say, you can find random generators on other web pages like random.org that work a lot better, and can also use the JavaScript `Math.ceil(Math.random()*n)` where `n` is the maximum number to generate a random number with your web browser's JavaScript console.

-

Google can roll a six-sided die, fyi.

-
Are you talking about phones? This doesn't seem to work with google search or omnibar. – Pacerier Nov 23 '15 at 21:23
I just typed 'roll a die' into the Chrome omnibox on my Chromebook and it worked for me. – Chris Morris Nov 25 '15 at 1:50
@pacerier: It may be a regional thing. – Al E. Nov 25 '15 at 2:23
@AlE., Seems that the update has reached here now. Nice, we can "flip a coin" too. – Pacerier Jan 3 at 22:01

Bookmark the following link. It will generate a random number between `1` and `?` from your browser.

``````javascript:alert%28Math.ceil%28Math.random%28%29*%28prompt%28%271-?%27,%276%27%29*1%29%29%29
``````
-
This is quite "troublesome" actually.... – Pacerier Jan 3 at 21:51

Google does not have a function of random number generation. Instead, you can use Wolfram Alpha.

For example, this query generates a random real number between 0 and 1. Again, this query generates a random integer number between 0 and 100.

-
Is this real random like random.org or pseudorandom (like what Google already has)? – Pacerier Jan 3 at 22:05

I can't find anything to suggest that you can do it with Google, but random.org has a random number generator on their home page that you can select start and end values and "roll" to get a number between.

They also have coin flippers and other random number related stuff.

Looks like the google calculator has a lot of features but random numbers is not one of them.

-