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. 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. 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. 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. I often use this for cooking/kitchen conversions. Ex:
    http://www.google.com/search?q=3+tablespoons+in+teaspoons

  17. Great tips.
    Thanks.

  18. I use google to check spelling 2-5 times a day πŸ˜€

  19. 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.

  20. 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

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

    Sorry…just had to ask that.

  22. 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

  23. 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.

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

  25. 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

  26. 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.

  27. 1.5 in hex — not working where i expect 0x01 ;(

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

  29. @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.

  30. 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.

  31. 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” ? πŸ˜‰

  32. For high school physics students everywhere:

    1 furlong/fortnight in mph
    http://www.google.com/search?q=1+furlong%2Ffortnight+in+mph

    40 cubits in meters
    http://www.google.com/search?q=40+cubits+in+meters

  33. 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!

  34. 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.

  35. What would a *US* based company know about Imperial to Metric conversions πŸ˜‰

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

  37. 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!

  38. 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!

  39. @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.

  40. Hi Matt,

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

    Deb

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

  42. 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

  43. 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

  44. 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…

  45. 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.

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

  47. …or keniki’s medication πŸ™‚

  48. very cool… I love Google, they’re 2 steps ahead of everybody else πŸ™‚

  49. @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

  50. 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.

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

  52. 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.

  53. 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 πŸ™‚

  54. 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.

  55. 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

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

css.php