It seems that you're using an outdated browser. Some things may not work as they should (or don't work at all).
We suggest you upgrade newer and better browser like: Chrome, Firefox, Internet Explorer or Opera

×
I have just realized that there is a way to do some simple calculations in your web browser (assuming it supports things like JavaScript). Some of you may already know about this (especially if you're a web developer), but for the benefit of those who don't, here is how to do this:
1. Press Ctrl+Shift+I. This will open up a panel on the right side of the browser window with a bunch of stuff.
2. Look for a tab titled "Console" and click on it. (This might or might not be necessary, depending on the browser.)
3. Scroll to the bottom of the window. There should be a ">" prompt there.
4, Type in a math expression, and press Enter, and your browser will calculate it for you. For example, if you type "1 + 1", you will get 2.

Explanation:
* By following these instructions, you just opened the browser's JavaScript console, one of the many tools that modern browsers provide to assist with web development. Hence, the math expression you entered was interpreted by the browser's JavaScript interpreter, and it just so happens that mathematical expressions are valid JavaScript expressions, which the interpreter will happily evaluate and print the result for you. You can actually put even more elaborate JavaScript here, like loops and even function definitions, which can be useful for more complex tasks, or even if you just want to play around with JavaScript.
* Of course, this also means that you will be subject to the usual limitations and quirks of JavaScript. For example, everything is represented as a 64-bit float, so 2 ** 53 == 2 ** 53 + 1, and 1 / 5 isn't exactly representable. ("**" is the exponentiation operator.)
* This method, of course, assumes that you are using a desktop browser on a system with a keyboard; I do not know if there is a way to do this on mobile.
* On the other hand, you don't actually need an internet connection to use the JavaScript console.
Nice discovery.

Personally, since I'm on Linux most of the time, I hit Ctrl-Alt-T to launch a console, type "python" and hit return to launch the interactive Python console, then do my calculations there in a similar fashion. Yes, bash and most shells can do calculations, but depending on which shell is active the syntax varies. Also, it's easier typing 4**3 instead of echo "$((4**3))" for every single calculation.

That reminds me, I need to set up a global shortcut to launch Powershell on my Windows work machine.

Also, Powershell is fairly powerful, but can seem weird, and requires a bit of typing for anything beyond addition, subtraction, multiplication, and division.
> 4*3
12
> [Math]::Pow(4,3) # in other places typed as 4**3, 4^3, or 4³
64

Of course, if you're more comfortable in Javascript than in other languages, the Javascript console in the common web browsers is probably more familiar.
low rated
avatar
Maighstir: Nice discovery.

Personally, since I'm on Linux most of the time, I hit Ctrl-Alt-T to launch a console, type "python" and hit return to launch the interactive Python console, then do my calculations there in a similar fashion. Yes, bash and most shells can do calculations, but depending on which shell is active the syntax varies. Also, it's easier typing 4**3 instead of echo "$((4**3))" for every single calculation.

That reminds me, I need to set up a global shortcut to launch Powershell on my Windows work machine.

Also, Powershell is fairly powerful, but can seem weird, and requires a bit of typing for anything beyond addition, subtraction, multiplication, and division.
> 4*3
12
> [Math]::Pow(4,3) # in other places typed as 4**3, 4^3, or 4³
64

Of course, if you're more comfortable in Javascript than in other languages, the Javascript console in the common web browsers is probably more familiar.
One advantage of Python over JavaScript (for this use case) is that it starts up instantly, where as it takes a moment to open the JavaScript console (even longer if you don't already have a browser running). Doing a bit of timing (using /dev/null as the script), on this desktop python3 takes .033 seconds, while node.js takes .994 seconds. (node.js is, I believe, based off the JavaScript engine in Chromium, so its startup time is a good indication of how long Chromium would take to start up just its JavaScript (ignoring GUI and other startup times).

Another advantage of Python is that it supports arbitrary precision integers, whereas JavaScript has only double-precision floats (which Python also has).

On the other hand, the big advantage of JavaScript here is that nearly every desktop these days has a web browser, whereas Windows systems don't usually have Python installed. (With that said, note that the situation is different on servers; you usually don't have web browsers there, though you might have node.js, but you're likely to have Python there.)

(Note: This comparison of programming languages only applies to this particular use case; if you're writing an application or utility rather than just doing a one-off calculation, this comparison does not apply.)
If it’s a simple question, then use a new funky tool called your mind!
If it’s more complicated, then type calc into you run box to get a fully functioning calculator.
avatar
nightcraw1er.488: If it’s a simple question, then use a new funky tool called your mind!
If it’s more complicated, then type calc into you run box to get a fully functioning calculator.
While you were all out partying, having pre-marital relations, and focusing on vanity, I was honing my mind with coolmathgames.com
low rated
Here's one strange JavaScript observation:

> x = 0 / 0
NaN
> x == x
false

(If you try this in Python, the first line will raise an error; JavaScript, on the other hand, will let you divide by zero (as will Lua).)
avatar
nightcraw1er.488: If it’s a simple question, then use a new funky tool called your mind!
If it’s more complicated, then type calc into you run box to get a fully functioning calculator.
avatar
Talin_Warhaft: While you were all out partying, having pre-marital relations, and focusing on vanity, I was honing my mind with coolmathgames.com
To be honest the partying consisted of taking 1/100th of a second of my time round ghost valley. Still got SNES hands!
Or, if you are using Vivaldi, just press F2 and type the expression in the quick window. Press enter to copy the solution.