# ncalc/ncalc

NCalc is a fast and lightweight expression evaluator library for .NET, designed for flexibility and high performance. It supports a wide range of mathematical and logical operations.

Repository: https://github.com/ncalc/ncalc
Canonical: https://ross.abutalabs.com/products/ncalc
Homepage: https://ncalc.gumbarros.com.br
Language: C#
License: MIT
License Family: permissive
Topics: csharp, dotnet, expressions, ncalc, runtime, evaluation, parser, antlr, antlr4, math, async
Last push: 2026-08-25T13:03:18+00:00

## Health v2 (maintenance only)
Score: 98/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 99, release rhythm 96, longevity 100
- inputs: {"age_days": 3213, "days_push": 8, "days_rel": 26, "gap_med": 13.0, "n_releases_24m": 31}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1154, forks 126 (observed 2026-08-28T04:03:47.769105+00:00)

## What it is
NCalc is a fast, lightweight expression evaluator library for .NET that parses and evaluates mathematical and logical expressions at runtime. It supports parameters, built-in and custom functions, lambda compilation, async evaluation, and dependency injection via optional packages.

## Use cases
- evaluate user-supplied math formulas at runtime in .NET
- parse and compute logical expressions dynamically
- let users define configurable formulas with parameters
- compile expressions to lambdas for high-performance repeated evaluation
- add custom functions to a runtime expression engine
- evaluate spreadsheet-like expressions in an app

## When to choose
- you need a lightweight, fast expression engine on .NET or .NET Framework
- you want extensible evaluation with custom functions and parameters
- you need async evaluation or lambda compilation of expressions

## When to avoid
- you need a full scripting language rather than expression evaluation
- your project is not on the .NET platform
- you need symbolic math or computer algebra rather than numeric evaluation

## Facets
- artifact type: library
- maturity: active
- function: parser, interpreter, math
- domain: developer-tools, programming-languages
- platform: dotnet, cross-platform
- tags: expression-evaluator, runtime-evaluation, antlr, formula-engine, csharp, algorithms

## Member repositories
- ncalc/ncalc (main) score 98

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:03:47.769105+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T06:33:23.310739+00:00, confidence not recorded.
  - readme: https://github.com/ncalc/ncalc (fetched 2026-08-28T04:03:47.769105+00:00, sha 075f93f299ec)
  - homepage: https://ncalc.gumbarros.com.br (fetched 2026-08-29T12:37:43.712388+00:00, sha e2f69f8d3b8d)
- Data as of 2026-08-30T08:39:29.467469+00:00.
