Open-source project
handsontable/hyperformula avatar
handsontable/hyperformula

HyperFormula: a headless Excel formula engine for TypeScript apps

HyperFormula is an open-source headless spreadsheet for business web apps. It comes with over 400 formulas, CRUD operations, undo-redo, clipboard support, and sorting.

2,799 stars175 forksTypeScriptNOASSERTION

At a glance

What is it?
HyperFormula parses and evaluates spreadsheet formulas without a grid, so business web apps can compute over tabular data on the client or in Node.js. It is GPLv3, and the licence is the first thing to check before you wire it in.
Who is it for?
Adopt HyperFormula when you need Excel-compatible formula evaluation inside a TypeScript app and you can live with GPLv3, or when you are already paying Handsontable for a commercial licence. Do not adopt it if you need a rendered grid, XLSX file parsing, or a permissive licence you cannot negotiate.
Can I use it commercially?
Check first. The repository uses a licence we do not classify automatically, so read its LICENSE file before any commercial use.
Is it still maintained?
Yes. The repository last received commits 4 days ago.
What is it written in?
Mainly TypeScript, according to GitHub's language statistics.

Answers come from the project's GitHub data, last synced on October 2, 2026, and from our analysis. They are not legal advice.

Editorial analysis

What HyperFormula solves, and who it is for

Spreadsheet formulas are a compact way to express business rules, and users already know them. The hard part is evaluating them without shipping a spreadsheet UI. HyperFormula is a headless spreadsheet: a TypeScript library that parses and evaluates formulas, with no grid and no assumption about how you render results. The README lists the intended uses as calculated fields in CRM and ERP software, custom spreadsheet-like apps, business logic builders, forms and form builders, educational apps, online calculators, and a deterministic compute layer for AI and LLMs. The common thread is that the formula is the product, not the cells. If your app already has a table component, a form, or a JSON payload, HyperFormula supplies the calculation layer underneath it. It is not a user-facing spreadsheet and does not claim to be one. The README says the library can run in the browser or as a service with Node.js as the back-end technology, so the same evaluation code can sit on either side of the wire.

How the engine evaluates formulas: sheets, named expressions and cell addresses

The API is built around a workbook object. You create an instance, add sheets, and address cells by sheet id, row and column. Formulas are ordinary strings beginning with an equals sign, and the engine resolves them across sheets. Named expressions are a first-class concept: you register a name once and reference it in formulas, which keeps business rules readable and lets you change a parameter in one place. The README example registers AnnualInterestRate, NumberOfMonths and LoanAmount as named expressions and then uses them inside a PMT formula. The repository layout supports the claim that this is a real parser rather than a string evaluator: the examples directory contains an AST image, a ranges image, and a topological sort image, alongside sample sheets in both formulas and values form. Those artifacts point to a pipeline of parsing to an abstract syntax tree, resolving ranges, and ordering the dependency graph before evaluation. The package description in package.json calls it a JavaScript engine for efficient processing of spreadsheet-like data and formulas. Around 400 built-in functions are documented, and the README states that custom functions are supported. Function syntax is documented as compatible with Microsoft Excel and with Google Sheets, and formula localization covers 17 built-in languages.

Installing HyperFormula from npm and computing a mortgage payment

The README gives one install command and one usage example. Install the package, then build an empty workbook with a licence key. The key is a string: 'gpl-v3' for the open source path. The example below reproduces the README flow: create the instance, add a sheet, register three named expressions, write a label and a PMT formula into row 0, and read both cells back.

bash
npm install hyperformula

After the install, the import works in a bundler or in Node. The README notes support for Node.js and links a server-side installation guide, so the same code runs on a back end.

js
import { HyperFormula } from 'hyperformula';

const hf = HyperFormula.buildEmpty({ licenseKey: 'gpl-v3' });
const sheetName = hf.addSheet('Mortgage Calculator');
const sheetId = hf.getSheetId(sheetName);

hf.addNamedExpression('AnnualInterestRate', '8%');
hf.addNamedExpression('NumberOfMonths', 360);
hf.addNamedExpression('LoanAmount', 800000);

The three named expressions become the inputs. Note that the interest rate is passed as the string '8%' while the term and principal are numbers, which is a useful reminder that the engine accepts spreadsheet-style literals.

js
hf.setCellContents(
  { sheet: sheetId, row: 0, col: 0 },
  [['Monthly Payment', '=PMT(AnnualInterestRate/12, NumberOfMonths, -LoanAmount)']]
);

console.log(`${hf.getCellValue({ sheet: sheetId, row: 0, col: 0 })}: ${hf.getCellValue({ sheet: sheetId, row: 0, col: 1 })}`);

What you should see is the label Monthly Payment followed by the computed value. The README also links a StackBlitz demo for this example. Beyond this flow, the README lists undo/redo, CRUD operations, clipboard support, named expressions and data sorting as supported features, each with its own guide page.

Where HyperFormula is the wrong tool

The most common mismatch is expecting a grid. HyperFormula does not assume any existing user interface, which is a design statement, not an omission: there is no rendering layer, no cell editor, no selection model. If you need those, you are looking at Handsontable, the data grid from the same team, or another grid library, and HyperFormula would sit underneath it. The second mismatch is file formats. The topics list includes xls and xlsx, but the README describes a parser and evaluator of spreadsheet formulas, not a file reader. Nothing in the README documents importing or exporting XLSX workbooks, so a team that needs to open a user's uploaded .xlsx file should not assume this library does it. The third is licence. The package.json declares GPL-3.0-only, so shipping HyperFormula inside a proprietary product without a commercial licence is a legal question, not a technical one. The fourth is calculation scope: formulas are evaluated by the engine, so anything that depends on a live external service, a database round trip, or a browser-only API has to be supplied as a custom function. Finally, the README does not document rollback or persistence, so if you expect the engine to save and restore workbook state, you need to check the guides rather than assume it.

HyperFormula compared with putting formulas in a grid component

The realistic alternative for most teams is not a different formula engine but a different architecture: keep the formulas inside a spreadsheet UI component such as Handsontable, which renders cells and evaluates them in the same object. That approach is shorter to build when the spreadsheet is the screen. The difference in approach is where state lives. With a grid component, the displayed cell and the computed value are the same object, and the UI owns the calculation. With HyperFormula, the workbook is a data structure you query by sheet id, row and column, and the UI is free to be a form, a table, a chart, or nothing at all. That separation is what makes server-side evaluation possible: the README states the library can run as a service with Node.js, so you can compute on the back end and send values to a client that never sees a formula. The cost is that you now own the rendering, the input handling and the mapping between your data model and cell addresses. Teams that want a spreadsheet on screen will find the grid component shorter. Teams that want formulas as a service, or formulas behind a form, get more from the headless split.

Licence, maintenance and upgrade cost

HyperFormula is offered under two licences: GPLv3 and a proprietary licence that can be purchased by contacting the Handsontable team. The package.json declares GPL-3.0-only, and the README points to a quote form for the commercial option. What that means for a closed-source product is a question for your legal team; the practical point is that the licence key is a required constructor argument, so the choice is visible in your code from the first line. The project is maintained by the team behind Handsontable, and the release cadence visible in the repository is roughly one minor release every three months, with 3.4.0 published on 2026-08-10 and the last push to the default branch on 2026-09-24. Upgrading is a normal dependency bump, but the engine is the calculation core of your app, so a minor release can change evaluation behaviour. The CHANGELOG.md at the repository root is the file to read before bumping the version, and the test and docs directories in the repository suggest the project treats documentation and behaviour tests as part of the release. If you fork or vendor the code, the GPLv3 obligations travel with your distribution.

Editorial conclusion

Adopt HyperFormula when you need Excel-compatible formula evaluation inside a TypeScript app and you can live with GPLv3, or when you are already paying Handsontable for a commercial licence. Do not adopt it if you need a rendered grid, XLSX file parsing, or a permissive licence you cannot negotiate. Before committing, verify the licence path your legal team will accept, then run the mortgage example from the README in your own build to confirm the PMT result matches what your users expect.

Frequently asked questions

Is HyperFormula free?

It is available under GPLv3 at no cost, and the README also offers a proprietary licence that can be purchased by contacting the Handsontable team. The constructor takes a licence key, and the README example passes 'gpl-v3'.

What is HyperFormula?

It is a headless spreadsheet written in TypeScript that parses and evaluates spreadsheet formulas, with no user interface of its own. The README describes it as usable in the browser or as a service with Node.js.

How is HyperFormula different from Handsontable?

HyperFormula does not assume any existing user interface and only computes values, while Handsontable is the data grid from the same team that provides the rendering. The README lists HyperFormula as maintained by the team that stands behind Handsontable.

Official sources

  1. handsontable/hyperformula on GitHub
  2. Issues
  3. Project website
  4. README
  5. Releases
Add this badge to your README

If you maintain this project, the badge below links readers to this analysis and shows its maintenance status from the daily GitHub snapshot. Paste the markdown into your README; add ?metric=license or ?metric=stars to the image URL for a different field.

Add this badge to your README

markdown
[![Hysen Labs](https://hysenlabs.com/badge/handsontable-hyperformula.svg)](https://hysenlabs.com/projects/handsontable-hyperformula)