PHPackages                             footballencarta/bmr - 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. footballencarta/bmr

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

footballencarta/bmr
===================

PHP class to calculate the "Basal Metabolic Rate" using the The Mifflin St Jeor Equation. Supports lb, kg and stone for weight, and feet, inches and cm for height.

2241PHP

Since Apr 24Pushed 9y ago1 watchersCompare

[ Source](https://github.com/footballencarta/BMR)[ Packagist](https://packagist.org/packages/footballencarta/bmr)[ RSS](/packages/footballencarta-bmr/feed)WikiDiscussions master Synced 2w ago

READMEChangelogDependenciesVersions (1)Used By (0)

[![Build Status](https://camo.githubusercontent.com/8b7ad22b7992d4721fb0e3db8b158505ccce324f3ce5bc41f5d875a3c753409b/68747470733a2f2f7472617669732d63692e6f72672f666f6f7462616c6c656e63617274612f424d522e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/footballencarta/BMR)

BMR
===

[](#bmr)

PHP class to calculate the "Basal Metabolic Rate" using the The Mifflin St Jeor Equation. Supports lb, kg and stone for weight, and feet, inches and cm for height.

Installation:
=============

[](#installation)

The preferred method of installation is via Packagist and Composer. Run the following command to install the package and add it as a requirement to your project's `composer.json`:

```
composer require footballencarta/bmr

```

Usage
-----

[](#usage)

The class is designed to work in a fluent way, so each option needs to be set before calculation

### Get the BMR

[](#get-the-bmr)

```
echo (new Footballencarta\BMR())
	->age(55)
	->gender(BMR::FEMALE)
	->heightInFeet(5, 6)
	->weightInStone(9, 4)
	->calculate();

// Result: 1204

```

Functions
---------

[](#functions)

### Height

[](#height)

For cm (centimeters), use the function `->heightInMetres($metres, $centimetres)`. This does allow metres to be 0 to allow just centimetres to be passed through

For feet &amp; inches, use the function `->heightInFeet($feet, $inches)`. Feet must be between 3 and 9, and inches must be between 0 and 11.

### Weight

[](#weight)

For kg (kilograms), use the function `->weightInKg($kg)`.

For lb (pounds), use the function `->weightInLb($lb)`.

For stone &amp; pounds , use the function `->weightInStone($stone, $lb)`. This does allow stone to be 0 to allow just pounds to be passed through

### Gender

[](#gender)

Unfortunately, the BMR calculation requires a binary gender.

For compatibility, it's suggested to use the `BMR::MALE` or `BMR::FEMALE` constants.

If you don't want to use the constants, any word beginning with an `m` is flagged as male, and anything with an `f` is flagged as female.

`->gender(BMR::FEMALE)` or `->gender('female')`

### Age

[](#age)

The age must be greater than 18 for the BMR calculation to work.

`->age(55);`

### Calculate function

[](#calculate-function)

You can use `->calculate()` to perform the calculation, which will return your BMR value.

You could also use `->getFormattedBmr()` to provide a 2dp number formatted version.

If there are any validation problems, either a `OutOfRangeException` or `InvalidArgumentException` will be thrown

###  Health Score

22

—

LowBetter than 21% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity10

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity41

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% 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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/9b02db96fba6c3488f9b78745274b813212cd02fcc7c7354f91d78a34672a603?d=identicon)[footballencarta](/maintainers/footballencarta)

---

Top Contributors

[![damon-williams-rm](https://avatars.githubusercontent.com/u/254429975?v=4)](https://github.com/damon-williams-rm "damon-williams-rm (5 commits)")

### Embed Badge

![Health badge](/badges/footballencarta-bmr/health.svg)

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

###  Alternatives

[rackbeat/laravel-ui-avatars

Official Laravel wrapper around ui-avatars.com and LasseRafn/php-initial-avatar-generator

43148.0k](/packages/rackbeat-laravel-ui-avatars)[pixelant/pxa-survey

Create simple survey. View results in the BE module

187.2k](/packages/pixelant-pxa-survey)

PHPackages © 2026

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