Use Your Browser’s Address Bar As A Calculator, Without Google’s Help

While Google can perform some simple calculations right from its home page, you can actually perform them with JavaScript in your address bar — no internet connection required.

Your address bar is useful for a lot of shortcuts, and using it as a calculator is a great one. However, Google can only perform certain simple calculations, and it requires that you actually load the Google page. If you want something quicker and more powerful, you can actually just use JavaScript. For example, to calculate 7*12, you would type:

javascript:7*12

into Firefox. In Chrome, the syntax is a bit different; you’d have to type:

javascript:alert(7*12)

You can just create search keywords for both of these (i.e. javascript:%s), so all you need to do is type, say, js 7*12 to get your answer.

What’s really cool is that you can perform more complicated things, like exponents, square roots, trigonometric functions and more. Hit the link for more info, or check out Mozilla’s documentation to see all that you can do with it.

Tip: Use JavaScript as a Calculator in Firefox and Chrome [2ality via Digital Inspiration]


The Cheapest NBN 50 Plans

Here are the cheapest plans available for Australia’s most popular NBN speed tier.

At Lifehacker, we independently select and write about stuff we love and think you'll like too. We have affiliate and advertising partnerships, which means we may collect a share of sales or other compensation from the links on this page. BTW – prices are accurate and items in stock at the time of posting.

Comments


3 responses to “Use Your Browser’s Address Bar As A Calculator, Without Google’s Help”

Leave a Reply