Wednesday, March 22, 2006

Google Calculator

Google Calculator is a hidden feature of Google search. You can type math expressions, unit conversions and many other questions that have a unique answer.

What's the answer to life, the universe and everything?
Answer: 42 (see Hitchhiker's Guide To The Galaxy)

How many seconds in a decade?
Answer: 315 569 260 seconds

Speed of light
Answer: 299 792 458 m / s

17 to binary
Answer: 0b10001

e^((pi)*i)+1
Answer: 0

10th root of 1024
Answer: 2

Half a cup in teaspoons
Answer: 24 US teaspoons

Ounces in a shot
Answer: 1.5 US fluid ounces

When is Easter 2006?
Answer:
(Western) April 16, 2006
(Orthodox) April 23, 2006

Earth mass in kg
Answer: 5.9742 × 1024 kilograms
  13 comments ( Post a comment )
I wrote a keyboard interface for the Google Calculator.

It can be found at:
http://www.xnumber.com/google_calc.htm

I'd appreciate any comments or sugestions about this feature I'd like to propose Google.

Also, if you know how to approach Google with an idea like this, please let me know.

Thanks!
Thanks for Google Calculator. It;s great.
Is the calculator getting dumber?

Some of these examples do not seem to work now (September 2007).
By "not work", I mean doing a google search does not invoke the calculator on those.
Half of them (5) did not work on some of my trials.
"Half a cup in teaspoons" seems to work some times, but not always.
Try it on server 72.14.207.107 .
The other four I can't get to work at all.

See also blogoscoped.
Most work. The only examples that don't work:

Ounces in a shot
Half a cup in teaspoons

Maybe Google things these queries aren't very appropriate for an instant answer.
Here are links to the search urls at google.com.

The starred examples 3, 7, 8, and a variant of 10 do not provide an answer.
Examples 9 and 10 produce a wiki answer, but not a calculator answer.
Apparently that is preventing the calculator from answering a variant of 10.

A more detailed analysis can be found at blogoscoped.

1. What's the answer to life, the universe and everything?

2. How many seconds in a decade?

3. Speed of light    *[does not invoke calculator]

4. 17 to binary

5. e^((pi)*i)+1

6. 10th root of 1024

7. Half a cup in teaspoons    *[does not invoke calculator, sometimes "Book results"]

  
cup/2 in teaspoons    [variant: invokes calculator]

8. Ounces in a shot    *[does not invoke calculator]

9. When is Easter 2006?    [invokes wiki, not calculator]

10. Earth mass in kg    [invokes wiki, not calculator]

  
Earth mass in grams    *[variant: does not invoke calculator or wiki]

  
1 * earth mass in kg    [variant: invokes calculator]
Tony Ruscoe noted at blogoscoped that the queries are case sensitive. In nine of the ten examples using the case Google recognizes will invoke the calculator.
Looks to me that, for example, "half a cup in teaspoons" works while "Half a cup in teaspoons" does not. Does this match with all your experiences?
yeah same here , if I use capitals won`t work. maybe there are few conversions in some units that are case sensitive.
try this:
-15 in two's complement
17 to binary
Answer: 0b10001

does anyone knows how to transform from binary back ?
@Marius:
0b10001 to decimal
i can't even get it to frickin' work!!
How many smoots in a mile