Mathos Parser

Mathos Parser is a mathematical expression parser, built on top of the .NET Framework, which allows you to parse all kinds of mathematical expressions, and in addition, add your own custom functions, operators, and variables. A collection of useful articles can be found here.

PM> Install-Package MathosParser


  • Parse all kinds of mathematical expressions.
  • Add conditional statements.
  • Customize operators. Add/edit existing operators, change behaviour of operators.
  • Programatically add variables before and on the run time.
  • Custom own functions with almost unlimited amount of arguments.
  • Using trig functions: sine, cosine, tangents, and also: arc sine, arc cosine, arc tangent.
  • Supports almost all of the functions available in System.Math, such as: pow, round, sqrt, rem, abs, and more!
  • Culture independent. No matter on what machine the library is being used - the same configurations for everyone.
  • Decimal operations.
  • And much more!


Mathos Parser is a part of Mathos, a project that provides useful methods, structures, etc, to make the life a little bit easier! This math parser is fully independent of Mathos project, so you can just use this library to archive a powerful math parsing experience. Please see the online demo!

How to use

It's really easy to use and understand this math parser. In this topic I will try to show you some (not all) key features of this library.

  • Adding a custom operator.
  • Adding a custom function.
  • Functions with more than one argument.
  • Programatically add variables.

Adding a custom operator

Adding a custom function

Functions with more than one argument

Programatically add variables