I put a calculator in your webpage so you can calculate while you webpage

A calculator

You don't need a calculator app. A calculator can be made on a webpage with some Javascript and Html. This one is about as simple as I can make it. It just uses eval on the expression in the text field, with all of the implications of that. I did do some basic input sanitization, but use at your own risk.

[Update June 20th, 2025: I just realized that if an integer number starts with a zero, it will be interpreted as an octal number. This is not how most people would expect a calculator to work. After pressing the AC button, the text field is now completely blanked, where previously it had been set to zero. The octal number handling is still in there, but it should be harder to trigger.

I also removed some code that grabbed focus after pressing the AC button because this was causing the onscreen keyboard to activate on the iPad. ]

Here is the direct link: calculator.html .