Wiris

Documentation / MathType

  • Demos
  • Visit our website
  • Downloads
  • Contact us
  • MathType

    • WirisQuizzes

      • Nubric

        • CalcMe

          • MathPlayer

            • Store FAQ

              • MathFlow

                • BF FAQ

                  • Miscellaneous

                    • Wiris Integrations

                      • Home
                      • MathType
                      • Technical documentation
                      • MathType for HTML editors
                      • Reference
                      • API services

                      Evaluation service reference

                      Reading time: 1min

                      Reference for the MathType evaluation service used to compute the numerical value of mathematical expressions.

                      Summary

                      The MathType evaluation service computes the numerical value of mathematical expressions represented as MathML. Variables can be assigned values at request time, allowing expressions to be evaluated dynamically. This service is intended for applications that require performing mathematical calculations programmatically.

                      Available interfaces

                      The evaluation service is available through the following interfaces.

                      Interface Availability
                      HTTP endpoint Cloud and self-hosted deployments
                      Java API Self-hosted Java deployments
                      .NET API Self-hosted .NET deployments

                      HTTP endpoint

                      The endpoint URL depends on your deployment.

                      Deployment Endpoint
                      Java /pluginwiris_engine/app/evaluate
                      PHP /integration/evaluate.php

                      Both GET and POST requests are supported. POST is recommended for large MathML expressions.

                      Request parameters

                      The evaluation service accepts the following request parameters.

                      Parameter Required Description
                      mml Yes Presentation MathML expression to evaluate.
                      var_<name> No Assigns a value to a variable before evaluation. For example, var_x=8.5.

                      Variables are supplied by prefixing the variable name with var_.

                      Example requests

                      Evaluate a constant expression:

                      GET /evaluate?mml=<math><mn>1</mn><mo>-</mo><mn>2</mn></math>

                      Evaluate an expression containing variables:

                      GET /evaluate?mml=<math><mi>x</mi><mo>-</mo><mn>2</mn></math>&var_x=8.5

                      Use POST when sending large MathML expressions.

                       

                      Response

                      The service returns the numerical result of the evaluated expression.

                      Error handling

                      Evaluation may fail if:

                      • The supplied MathML is not valid.
                      • The expression cannot be evaluated because of a syntax error.
                      • An arithmetic error occurs (for example, division by zero).

                      In these situations, the service returns an HTTP 5xx error.

                      Notes

                      • Only well-formed mathematical expressions can be evaluated.
                      • Variables are optional and can be supplied dynamically with each request.
                      • The evaluation engine internally converts Presentation MathML into Content MathML before performing the calculation.

                      Java and .NET APIs

                      The evaluation service is also available through the Java and .NET APIs. For complete method signatures, return types, and implementation details, see:

                      • Java API reference.
                      • .NET API reference.

                      Related articles

                      • MathType API services.
                      • Expression evaluation.
                      • Content MathML.

                      Was this article helpful?

                      Give feedback about this article

                      Related Articles

                      • Evaluation Methods Used: Screen reader,visual inspection using assistive technologies. Testing is based on general product knowledge.
                      • Conversion services reference
                      • Accessibility services reference

                      Evaluation service reference

                      Summary Available interfaces HTTP endpoint Request parameters Example requests Response Error handling Notes Java and .NET APIs Related articles

                      Empowering STEM education

                      MathType

                      • Office Tools
                      • LMS
                      • XML
                      • HTML

                      WirisQuizzes

                      Nubric

                      Integrations

                      Solutions

                      • Education
                      • Publishing houses – platforms and interactive
                      • Publishing houses – Print and digital
                      • Technical writers

                      Pricing

                      Downloads

                      Blog

                      • Success stories

                      About us

                      • Careers
                      • Partnership

                      Contact Us

                      Contact Sales

                      European union (European Regional Development Fund) and 1EdTech (TrustEd Apps Certified)
                      • Cookie Policy
                      • Terms of Use
                      • Privacy Policy / GDPR
                      • Student Data Privacy
                      • Compliance
                      • Cookie Settings

                      © Wiris 2026

                      Expand