Quick MathsJS Web Calc
Show Quick Start

Quick Start

Example: Given this input:
# Basic Expressions with Direct Calculation
1 + 1 = ?
    = ?

# Variable Assignment with Explicit Value Retrieval
a = 3
a: ?

# Simultaneous Assignment And Results
c = a + 3 = ?

# 2> spaces as alt method for Explicit Value Retrieval
    c = ?
After calculation, you will get this output:
# Basic Expressions with Direct Calculation
1 + 1 = 2
    = 2

# Variable Assignment with Explicit Value Retrieval
a = 3
a: 3

# Simultaneous Assignment And Results
c = a + 3 = 6

# 2> spaces as alt method for Explicit Value Retrieval
    c = 6
  1. Open the calculator by simply loading this webpage in your preferred web browser.
  2. Type mathematical expressions in the provided textarea.
  3. To assign a value to a variable, use the format: a = 5.
  4. To evaluate an expression, write it and then append with =. For example: a * 2 =. The result will automatically be displayed next to the expression.
  5. For multi-variable assignments or expressions with provided results, use the format: a = b = 2 + 3 =.
  6. For explicit output add 2 spaces or more before a variable =.
  7. = by itself will imply displaying results from previous calcuation.
  8. Errors, such as division by zero or undefined variables, will be indicated next to the problematic expression. For example: 1 / 0 = Error: Division by zero.
  9. English sentences can be supported as variable names as long as it does not conflict with MathJS reserved keywords like `in`, `i`, `or` and any other reserved keywords. e.g. 'People Count' can be a variable
  10. To save your calculations, simply copy the URL which now contains your compressed data.
  11. To load previously saved calculations, paste the copied URL into your browser.

Click To Load Example

For a comprehensive guide, more detailed instructions and source code, check out the full README. Additionally, for details on supported mathematical syntax and operations, refer to the math.js documentation.

For developers, there is an NPM package located QuickMathJS NPM Package so you can integrate this in your projects like a text editor extention.

quickmathjs.com. Copyright © 2023 Brian Khuu • powered by math.js.