PHPackages                             phpoffice/math - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. phpoffice/math

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

phpoffice/math
==============

Math - Manipulate Math Formula

0.3.0(11mo ago)3111.7M—9.8%48MITPHPPHP ^7.1|^8.0CI passing

Since Sep 25Pushed 5mo ago4 watchersCompare

[ Source](https://github.com/PHPOffice/Math)[ Packagist](https://packagist.org/packages/phpoffice/math)[ Docs](https://phpoffice.github.io/Math/)[ RSS](/packages/phpoffice-math/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (3)Dependencies (2)Versions (4)Used By (8)Security (1)

Math
====

[](#math)

[![Latest Stable Version](https://camo.githubusercontent.com/d631b376196bf512d38acbd2b91d3ed9ed686756f1a2e8d2dd302e13423df9c0/68747470733a2f2f706f7365722e707567782e6f72672f7068706f66666963652f6d6174682f762f737461626c652e706e67)](https://packagist.org/packages/phpoffice/math)[![Coverage Status](https://camo.githubusercontent.com/91b4cb251e26bb070a0a768cb3b20d41ebd12612a306fe51ce94732b6830784a/68747470733a2f2f636f766572616c6c732e696f2f7265706f732f6769746875622f5048504f66666963652f4d6174682f62616467652e7376673f6272616e63683d6d6173746572)](https://coveralls.io/github/PHPOffice/Math?branch=master)[![Total Downloads](https://camo.githubusercontent.com/c3778ff8a89108c9320e2550e500decad691116a086396b92eeac2485b12dc6e/68747470733a2f2f706f7365722e707567782e6f72672f7068706f66666963652f6d6174682f646f776e6c6f6164732e706e67)](https://packagist.org/packages/phpoffice/math)[![License](https://camo.githubusercontent.com/bfefc490236c4295f7e36888bb2824fc12735f5b253aaa7c8867705a72b2fcfd/68747470733a2f2f706f7365722e707567782e6f72672f7068706f66666963652f6d6174682f6c6963656e73652e706e67)](https://packagist.org/packages/phpoffice/math)[![CI](https://github.com/PHPOffice/Math/actions/workflows/php.yml/badge.svg)](https://github.com/PHPOffice/Math/actions/workflows/php.yml)

Math is a library written in pure PHP that provides a set of classes to manipulate different formula file formats, i.e. [MathML](https://en.wikipedia.org/wiki/MathML) and [Office MathML (OOML)](https://en.wikipedia.org/wiki/Office_Open_XML_file_formats#Office_MathML_(OMML)).

Math is an open source project licensed under the terms of [MIT](https://github.com/PHPOffice/Math/blob/master/LICENCE). Math is aimed to be a high quality software product by incorporating [continuous integration and unit testing](https://github.com/PHPOffice/Math/actions/workflows/php.yml). You can learn more about Math by reading this Developers'Documentation and the [API Documentation](http://phpoffice.github.io/Math/docs/)

If you have any questions, please ask on [StackOverFlow](https://stackoverflow.com/questions/tagged/phpoffice-math)

Read more about Math:

- [Features](#features)
- [Requirements](#requirements)
- [Installation](#installation)
- [Contributing](#contributing)
- [Developers' Documentation](https://phpoffice.github.io/Math/)

Features
--------

[](#features)

- Insert elements:

    - Basic :

        - Identifier : a
        - Operator : +
        - Numeric : 2
    - Simple :

        - Fraction : a3
        - Superscript : a3
    - Architectural :

        - Row
        - Semantics
- Support

    - MathML
    - OfficeMathML

Requirements
------------

[](#requirements)

Math requires the following:

- PHP 7.1+
- [XML Parser extension](http://www.php.net/manual/en/xml.installation.php)
- [XMLWriter extension](http://php.net/manual/en/book.xmlwriter.php)

Installation
------------

[](#installation)

Math is installed via [Composer](https://getcomposer.org/). To [add a dependency](https://getcomposer.org/doc/04-schema.md#package-links) to Math in your project, either

Run the following to use the latest stable version

```
composer require phpoffice/math
```

or if you want the latest unreleased version

```
composer require phpoffice/math:dev-master
```

Contributing
------------

[](#contributing)

We welcome everyone to contribute to PHPWord. Below are some of the things that you can do to contribute.

- [Fork us](https://github.com/PHPOffice/Math/fork) and [request a pull](https://github.com/PHPOffice/Math/pulls) to the [master](https://github.com/PHPOffice/Math/tree/master) branch.
- Submit [bug reports or feature requests](https://github.com/PHPOffice/Math/issues) to GitHub.
- Follow [@PHPOffice](https://twitter.com/PHPOffice) on Twitter.

###  Health Score

48

—

FairBetter than 94% of packages

Maintenance63

Regular maintenance activity

Popularity57

Moderate usage in the ecosystem

Community21

Small or concentrated contributor base

Maturity40

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 84.3% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~306 days

Total

3

Last Release

354d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/792895a1976f2be3789d45a658de84d94a901d1137b4417b27840ccaa0dba2e3?d=identicon)[Progi1984](/maintainers/Progi1984)

---

Top Contributors

[![Progi1984](https://avatars.githubusercontent.com/u/1533248?v=4)](https://github.com/Progi1984 "Progi1984 (43 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (8 commits)")

---

Tags

mathmloommlphpMathMLofficemathml

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Type Coverage Yes

### Embed Badge

![Health badge](/badges/phpoffice-math/health.svg)

```
[![Health](https://phpackages.com/badges/phpoffice-math/health.svg)](https://phpackages.com/packages/phpoffice-math)
```

###  Alternatives

[imanghafoori/laravel-anypass

A minimal yet powerful package to help you in development.

21421.6k](/packages/imanghafoori-laravel-anypass)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
