Use your Browser Address Bar as a 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
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]