Use your Browser Address Bar as a Calculator

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:

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

Amit Agarwal

Amit Agarwal

Google Developer Expert, Google Cloud Champion

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.

Amit has developed several popular Google add-ons including Mail Merge for Gmail and Document Studio. Read more on Lifehacker and YourStory

Awards & Titles

Digital Inspiration has won several awards since it's launch in 2004.

Google Developer Expert

Google Developer Expert

Google awarded us the Google Developer Expert award recogizing our work in Google Workspace.

ProductHunt Golden Kitty

ProductHunt Golden Kitty

Our Gmail tool won the Lifehack of the Year award at ProductHunt Golden Kitty Awards in 2017.

Microsoft MVP Alumni

Microsoft MVP Alumni

Microsoft awarded us the Most Valuable Professional (MVP) title for 5 years in a row.

Google Cloud Champion

Google Cloud Champion

Google awarded us the Champion Innovator title recognizing our technical skill and expertise.

Email Newsletter

Sign up for our email newsletter to stay up to date.

We will never send any spam emails. Promise.