PHPackages                             samlittler/luhn-mod-16 - 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. samlittler/luhn-mod-16

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

samlittler/luhn-mod-16
======================

A PHP library for calculating Luhn Mod 16 checksums as used by Royal Mail and others

v2.0.0(4y ago)22903proprietaryPHPPHP ^8

Since Sep 1Pushed 4y ago1 watchersCompare

[ Source](https://github.com/samlittler/luhn-mod-16)[ Packagist](https://packagist.org/packages/samlittler/luhn-mod-16)[ Docs](https://github.com/sammakescode/luhn-mod-16)[ RSS](/packages/samlittler-luhn-mod-16/feed)WikiDiscussions master Synced today

READMEChangelogDependencies (1)Versions (8)Used By (0)

luhn-mod-16
-----------

[](#luhn-mod-16)

A library for calculating Luhn Mod 16 checksums in PHP. Especially useful for those dealing with Royal Mail labels.

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

[](#installation)

Download with composer by using:

```
composer require samlittler/luhn-mod-16

```

Usage
-----

[](#usage)

Usage is simple.

```
$checksum = \LuhnMod16\LuhnMod16::calculate($your_test_value);

```

###  Health Score

32

—

LowBetter than 69% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity16

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity68

Established project with proven stability

 Bus Factor1

Top contributor holds 90.9% 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 ~348 days

Recently: every ~504 days

Total

7

Last Release

1497d ago

Major Versions

v0.1.0 → v1.0.02016-11-17

v1.0.4 → v2.0.02022-05-25

### Community

Maintainers

![](https://www.gravatar.com/avatar/96775b72e83f533028dc82c8f24df717f837f8b3ba00b6f25e305179ef627c3b?d=identicon)[SamMakesCode](/maintainers/SamMakesCode)

---

Top Contributors

[![SamMakesCode](https://avatars.githubusercontent.com/u/10065536?v=4)](https://github.com/SamMakesCode "SamMakesCode (10 commits)")[![tinnerdxp](https://avatars.githubusercontent.com/u/1458530?v=4)](https://github.com/tinnerdxp "tinnerdxp (1 commits)")

---

Tags

luhnchecksumMod

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/samlittler-luhn-mod-16/health.svg)

```
[![Health](https://phpackages.com/badges/samlittler-luhn-mod-16/health.svg)](https://phpackages.com/packages/samlittler-luhn-mod-16)
```

###  Alternatives

[marvinlabs/laravel-luhn

Luhn algorithm for Laravel

108433.0k](/packages/marvinlabs-laravel-luhn)[selective/luhn

Luhn library, modulo 10

10119.9k1](/packages/selective-luhn)

PHPackages © 2026

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