TypeScript numerical computing for the browser

MathJSLab brings a mathematical lab to the web.

MathJSLab simulates a subset of the MATLAB®/Octave language. Use one of the online applications to explore MathJSLab features. Use the npm package in your project to run expressions, functions and matrices, with MathML-rendered results and full compatibility in the web browser.

Install package npm install mathjslab
>> A = [1 2; 3 4]
A=[1234]
>> det(A)
det(A)=-2
>> f = @(x) a*x^2+b*x+c
f=@(x)ax2+bx+c

Execution flow

How MathJSLab processes an expression

MathJSLab reads the input, parses it into an internal representation, evaluates expressions and commands, and renders mathematical results as MathML for the browser.

Diagram showing the MathJSLab pipeline from user input through parsing, evaluation, command processing and MathML rendering.

Features

MathJSLab is an interpreter with syntax like MATLAB®/Octave, intended for educational purposes and available in the browser.

Interpreter engine

The core package is written in TypeScript and simulates a subset of MATLAB®/Octave syntax.

Mathematical output

The interpreter works with arbitrary precision arithmetic through decimal.js and can generate expressions and results rendered in MathML.

Ecosystem

Project ecosystem

The MathJSLab Organization on GitHub owns the project repositories: the npm package, the web applications, the project page and the organization profile itself.

Publication

Publication and identifiers

MathJSLab is published as free software, distributed as a reusable package and with persistent identifiers assigned to it.

The interpreter package is published in the npm registry as mathjslab. The source code is maintained under the MathJSLab organization on GitHub, and the package, the companion web application, the calculator and the batch application have DOI and ISBN identifiers so they can be cited in academic and institutional contexts.

web application

mathjslab-app

The browser application demonstrates the interpreter, is maintained on GitHub and has its own DOI and ISBN records.

calculator application

mathjslab-calc

The calculator application offers a simplified prompt interface hosted at calc.mathjslab.com, with its own DOI and project publication badges.

batch application

mathjslab-batch

The batch application provides a text-area interface with syntax highlighting for running MathJSLab commands in sequence.

Archive

Archive

Files and documents related to the MathJSLab project.

Resources

Resources

Try the web applications from the app hub. Install the npm package, browse the organization profile on GitHub or consult the command help.

MathJSLab is intended for educational purposes, helping teachers and students use a computer-aided calculation tool that runs in the browser.

MathJSLab is not affiliated, sponsored or endorsed by The MathWorks, Inc. MATLAB® is a registered trademark of The MathWorks, Inc.

Contact

Contact

To contact the MathJSLab project organization, write to the address

mathjslab@gmail.com

License

MIT License

MathJSLab is distributed as free software under the MIT License, allowing use, modification and redistribution under the terms below.

MIT License

Copyright (c) 2016-2026 Sergio Lindau, mathjslab.com, ISBN 978-65-00-82338-7

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.