How to use Google’s calculator: convert to hexadecimal, binary, and decimal

One of Google’s goals is that you should be able to throw just about anything into a search box (package tracking numbers, airline flight numbers, etc.) and Google will try to do something reasonable, such as return the status of a flight. Recently I was trying to reverse engineer a USB protocol and needed to convert some numbers between base 16 (hexadecimal) and base 10 (decimal). On a hunch, I threw the conversion into a Google search box. Sure enough, it worked fine.

Converting hexadecimal to decimal with a search query like [0x607a in decimal]:

Convert hex to base10

Convert decimal to hexadecimal with a Google query like [1854 in hex]:

Convert decimal to base 16

You can even convert hexadecimal to binary with a query like [0x770 in binary]:

Convert base16 to base2

Of course, you can also use alternate queries like [convert 0x770 to base 2]. Pretty handy.

Bonus tip: did you know that you can do currency conversion too? Just type something like [one dollar in yuan]:

Convert my currency

If you have favorite tips for searches, leave them in the comments.

57 Responses to How to use Google’s calculator: convert to hexadecimal, binary, and decimal (Leave a comment)

  1. When I need to convert something, look up a package status, or a flight status, Google is the first place I go. Google is probably one of the best converters out there. Very handy when doing physics homework…

    I especially love that GMail parses out package tracking information from an order email and provides a link to the respective shipper’s tracking information on the right side above the ads.

  2. Surprisingly, not many others know about these advanced features.

    We tested several advanced calculations on a hunch and have been using Google ever since

  3. Harith

    Matt,

    “One of Google’s goals is that you should be able to throw just about anything into a search box (package tracking numbers, airline flight numbers, etc.) and Google will try to do something reasonable, such as return the status of a flight.”

    I’m gonna take you on your words, and throw the followings into GOOG’s search box:

    SEO of large news site .

    Nothing reasonable came out :(

    May be you wish to help with few tips :)

  4. I use this feature all the time aboard ship and I usually link each blog post I write referencing a vessel’s speed in knots to the conversion page for knots->mph. I know there are better ways but it’s just to easy doing it this way.

  5. Great Tip matt, I ussualy go to xe.com to check for conversion i did not knew that it is possible in google.

  6. Hi Matt, thanks for the reminder.

    I successfuly tracked my UPS package thanks to this tool… very useful

    I use also a lot “sq m to sq ft” which convert square meters to square feet

  7. Once upon a time, currency conversion also worked using the more standard notation: [$ 123.45 in €], or [USD 123.45 in EUR].
    At some point, this stopped working, and now you have to use [123.45 $ in €] or [123.45 USD in EUR].

    Is there any reason for this?

  8. O.K., so I threw some random stuff in to see what came up.

    I entered my phone number in, and it said “Best Chiropractor in San Diego”
    That’s cool.

    I entered my wife’s birthday and a page on pregnancy came up as the top listing. “Uh Oh”

    I entered my birthday and it said, “Utensil for Opening Containers With Screwed Lids.”
    Which oddly actually makes perfect sense to me.

    It’s kind of like a techno fortune cookie.

    I have taken Google’s access to the worlds data for granted for so long, that I actually ask it almost anything on a regular basis, and am no longer surprised by anything cool it returns.

    dk

  9. I recently came across an old screencast I made showing some of the things I’ve noticed through giving “In Search of Google” talks ( http://h2obeta.law.harvard.edu/106431 ) that have prompted the response from members of the audience- “I didn’t know you could do that [in a Google search box]”

    http://ouseful.open.ac.uk/tu120playground/googleSearchBox/

    It includes some of the conversions above, as well as more elaborate ones. The local/map result is showing its age though!

  10. Typed in a bunch of stuff (personal dates, etc) and I don’t get anything reasonable from google, much less anything resembling an e-fortune cookie.

    I’ll stick with conversions and general search ty.

  11. TZ queries like [10:00 AM PST in GMT +2] would be neat. Just scrape http://wwp.greenwichmeantime.com/time-zone/usa/pacific-time/. ;)

  12. Another “unusual” use of Google is to check the correct spelling of a word. Whenever my Firefox spelling checker rejects a word, I just type this word in the Google’s search box and Google ends up making a query suggestion which is very likely to be the correct spelling of that word. Then, I click the suggestion and read the description of the first search results to confirm that this was actually the word that I was looking for. A very handy way. The bad thing, I don’t have to go anymore to get my dictionary, so less exercise for me :)

  13. Steve Jeffery

    This is by turns brilliant and a little dumb. If you type in “40 in hex” it does the calculation. If you type instead “40 IN HEX” it does the search with no suggestion a calculator exists.
    Whoever came up with this must be a *nix geek. ;-)

  14. My favorite that I typed yesterday in fact: “light year in miles”:

    1 light year = 5.87849981 × 1012 miles

  15. Dom

    I like even more the Firefox’s feature “Show search suggestions” (is this built in or is this due to some addon I have?) so whenever I have something to compute, there’s really no need to fire up a calculator — I simply use the search bar in Firefox (in which I spend most of my time anyway) — and I don’t even have to load the Google SERPs – the result just shows beneath the search bar.

    I regularly use it to convert currencies and I agree with Sebastian that time zone queries would be a nice addition.

  16. Dinah

    I often use this for cooking/kitchen conversions. Ex:
    http://www.google.com/search?q=3+tablespoons+in+teaspoons

  17. I use google to check spelling 2-5 times a day :D

  18. Spiderman: You’ve got to be careful of that. Google will let you away with un-words, like ‘referer’, as long as they’re sufficiently popular in common usage.

  19. I’ve made a little helper to assist with some of the more complicated formulas using google to do the “heavy lifting”.

    http://www.daysleft.com/googlecalc-investment.php

  20. Is un-word an un-word or is un-word a word?

    Sorry…just had to ask that.

  21. Useful tool

    I could have sworn it used to do PS to HP conversions but that seems to have stopped working

    Interesting that Google knows about the difference between USA and UK imperial Units but not enough to default to the correct imperial unit on google.co.uk. adding UK to the query seems to force the corect unit

    http://www.google.co.uk/search?hl=en&q=160+liters+in+pints&meta=
    http://www.google.co.uk/search?hl=en&q=160+liters+in+uk+pints&meta=

    With some further checking it does know about slugs but not about cumec’s

  22. I love Google Calculator – I use it all the time – I just had one issue with it. I wrote about this on blogoscoped.com over here http://blogoscoped.com/forum/122090.html . My problem was that I couldn’t get it to give me the final number answer to 5 to the 30th power. It just gave me “9.31322575 × 10 to the 20th” which doesn’t really help me. http://www.google.com/search?sourceid=navclient&ie=UTF-8&rls=GGLL,GGLL:2007-50,GGLL:en&q=5+to+the+30th+power And when I did that calculation it really got me nowhere http://www.google.com/search?hl=en&rls=GGLL%2CGGLL%3A2007-50%2CGGLL%3Aen&q=9.31322575+%C3%97+10+to+the+20th .

    But I still love Google Calculator and will continue to use it – But if you could help fix this to make this even better that would be great.

  23. Michael Schaap, I’ll see if I can find the right person to ask about that.

  24. Hi Matt and all

    i’ve used the google calculator before but not the hex/decimal conversion; thanks, it is actually quite neat.

    Don’t know if it’s too much to ask for, but does anyone know if there is a way to use google calculator to convert an RGB colour code in decimal to hex? (which i need to do quite often!)

    Surely I can perform 3 searches (e.g. ’255 in hex’ ’254 in hex’ and ’253 in hex’ thus giving xFFFEFD) but this is not really practical (I’m better off using a colour converter from somewhere else to do it in one go). What I would ideally like to do would be to enter ’255254253 in hex’ (or something like this) and get xFFFEFD (instead of 0xF36DEED that I get because google interpretes the colour code as 1 number instead of 3).

    Is there a way of doing this or am I being too picky/demanding? :)

    S

  25. By far the best search tip has to be local weather. All you do is search your city followed “weather”. For example if you want to know the weather in Chicago just search “Chicago Weather” — It’s Amazing.

  26. 1.5 in hex — not working where i expect 0×01 ;(

  27. I’ve always liked the define: function, great for spelling and general definitions.
    Yeah, not a power user query, but still handy.

  28. @WebFinity Girl: The query: “Chicago Weather” doesn’t work.
    I also tried “amsterdam weather”. Didn’t work either.

    Is it because I’m located in the Netherlands?
    I use http://www.google.com instead of http://www.google.nl.

  29. My wife and I recently used Google to convert units for our new popcorn machine. Unfortunately we suffered from a fatal PEBCAK and almost reached critical corn mass.

  30. Anders

    How about “the number of horns on a unicorn times the answer to life, the universe and everything to the power of e AU/ pi lightyears in ieee floating point” ? ;-)

  31. As the Google Blogoscoped blog noted recently (http://blogoscoped.com/archive/2008-01-13-n28.html), Google Calculator can perform conversions and other calculations using the Potrzebie System of Weights and Measures, a system defined in a 1957 issue of Mad Magazine. Of course it’s not useful at all, but the fact that Calculator can compute even in fictional measurement units demonstrates the comprehensiveness of the service!

  32. g1smd

    On occasions where a calculation brought forth normal search results instead of the answer to the calculation, simply adding an = sign to the end of the question then seemed to made it work as expected.

  33. Dave (original)

    What would a *US* based company know about Imperial to Metric conversions ;)

  34. Me too, i normally go to xe for currency converting. Google is a good tool for us. thank you for sharing.

  35. Currency conversion is sweet. I had hit Google several times to find Yahoo’s currency converter — for some reason the bookmarks never took. :-)

    I have been checking daily for my upcoming trip to Europe and now I’ll be using Google to convert from now on!

  36. I use it all the time to convert metric to imperial, usually for recipes but sometimes when I am trying to figure out temperatures or distance in km versus miles. I have shared this tip with many fellow Canadians over the past couple of years.

    The flight one was new to me, that one rocks… it is far easier than trying to use the mobile unfriendly Alaska Airlines flight status checker when I am in the airport and my flight is hovering between delayed and cancelled. I just wish it had airport conditions for Canadian airports too!

  37. @Michael van Helden; When you try this function from another country (with a different language), you should translate your query. So in Dutch that would be: ‘weer nijmegen’.

    This query does work.

  38. Deb

    Hi Matt,

    It’s nice to see a decimal conversion and more, I am really enjoying the mathematics-google work

    Deb

  39. That’s pretty nice feature, I hope it will give information about weather of specific country too.

  40. Hi Matt,

    So is 1.79769313 × 10308 the largest number Google can show? I tried (2^1 023) * 1.99999999999999988889999. you can add a couple of nines but after that Google can’t recognize the formula

  41. That is really cool. I use the calculator a lot and never realized it did hex, binary and octal. My favorite test for all calculators is http://www.google.com/search?q=e%5E(i*pi) and was so impressed google had the answer!

    I keep hoping for a date calculator, like “today + 5 weeks”, or “today – 30 sept 1963 in days”, etc… I suspect there isn’t a huge demand for it and it would be really challenging to implement right.

    Jeff

  42. David

    Very useful tool and I like that G has added tools to search.

    I wish they would search their queries and add “calculations” for the top items that are requested.

    For example,
    & url encoded is…

  43. Chris Mills

    I second that from David. After reading this, I found myself attempting to use the search box to url encode and decode strings. Doesn’t seem to work at this point, but I would definately use it if it did.

  44. Hey Google,
    Can you help me find my car keys?

  45. Dave (original)

    …or keniki’s medication :)

  46. very cool… I love Google, they’re 2 steps ahead of everybody else :)

  47. @Open English

    Guess that the result of all their free services, like Google Analytics.

    With that Google database you can tell whats to become the next big thing before it even becomes a thing :-)

    Gotta respect that entrepeneur thinking

  48. Improfane

    Interesting. Although.

    It’s kind of sad that computer desktops of the 21st century cannot convert between hex, binary and convert between units without additional software.

  49. This is a great feature; I use it all the time for a variety of quick engineering calculations.

  50. This is a great tip. Such a time saver, I always track packages for my company and spend half the time figuring out who we shipped it with and that companies website. Thanks.

  51. i really like the currency converter. the confusing thing is usage of different names for Israeli currency. ILS and Shekels are working and commonly used NIS is not. Temperature converter is a real saver too – baby thermometer switched to F once and the manual doesn’t provide how to change it back to C, so Google temperature converter is very handy now. and this post was checked by spell check from Google toolbar :-)

  52. I have a conversion site that goes up to 80 bits, in case the 40 bits that Google’s conversion offers you doesn’t get it done. It’s http://bitizer.com Also, a little easier when you’re doing a lot of conversions, I think.

  53. David

    If you don’t know about the ’0x’, ’0b’ … I’ve got a pretty good site that explains the thing very well http://www.stringfunction.com/
    for example: hex to decimal converter
    David

  54. Don

    If you still can’t find a good time converter, here you go: http://www.gmtslider.com.

Leave a Comment

Your email address will not be published. Required fields are marked *

*

If you have a question about your site specifically or a general question about search, your best bet is to post in our Webmaster Help Forum linked from http://google.com/webmasters

If you comment, please use your personal name, not your business name. Business names can sound salesy or spammy, and I would like to try people leaving their actual name instead.

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

css.php