Use your Browser Address Bar as a Calculator

U
Published in: browser - Javascript

google calculator

If you have set Google as your default search provider, you can use the browser’s address bar as an instant calculator.

Simply enter the calculation in the address bar, Google will compute the answer on its own servers and will send you the result as a “search suggestion.” You don’t even have to press the Enter key.

This works with IE and Google Chrome while in the case of Firefox, you’ll have to type the expression in the browser’s search box instead of the address bar.

Your Browser as a Calculator without Google

You can also perform calculations inside the browser offline without requiring Google.

Go to your browser’s address bar, type javascript: followed by any calculation and hit Enter. The calculation will happen inside the browser itself as shown in the screencast:

https://www.youtube.com/watch?v=Rs0UQtuyWGI

Axel Rauschmayer, who first wrote about this technique on 2ality.com, suggests that you can even perform complex calculations with JavaScript, something which is not possible with the Google Calculator.

Here are some examples that you may try or check Mozilla Docs for a complete list of Maths functions that are supported in JavaScript.

1. javascript:Math.random() [Find random number between 0 & 1] 2. javascript:Math.pow(3,9) [What is x to the power of y] 3. javascript:Math.sqrt(32) [Find the square root of a positive number]

Also see: Do More from your Browser’s Address Bar

📮  Subscribe to our Email Newsletter for Google tips and tutorials!
Published in: browser - Javascript

Looking for something? Find here!

Meet the Author

Web Geek, Google Developer Expert
A
Amit Agarwal

Amit Agarwal is a Google Developer Expert in Google Workspace and Google Apps Script. He holds an engineering degree in Computer Science (I.I.T.) and is the first professional blogger in India. He is the developer of Mail Merge for Gmail and Document Studio. Read more on Lifehacker and YourStory

Get in touch

Google Add-ons

Do more with your Gmail and GSuite account
G

We build bespoke solutions that use the capabilities and the features of Google Workspace for automating business processes and driving work productivity.

  1. Mail Merge with Attachments
    Send personalized email to your Google Contact with a Google Sheet and Gmail
  2. Save Emails and Attachments
    Download email messages and file attachments from Gmail to your Google Drive
  3. Google Forms Email Notifications
    Send email notifications to multiple people when a new Google Form is submitted
  4. Document Studio
    Create beautiful pixel perfect documents merging data from Google Sheets and Google Forms
  5. Creator Studio for Google Slides
    Turn your Google Slides presentations into animated GIFs and videos for uploading to YouTube