PHPackages                             th3mouk/pokemongo-iv-calc - 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. th3mouk/pokemongo-iv-calc

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

th3mouk/pokemongo-iv-calc
=========================

The most accurate PHP lib to calculate Pokemon Go IV

1.7.0(8y ago)8862[1 issues](https://github.com/Th3Mouk/PokemonGo-IV-Calculator/issues)MITPHPPHP ^7.1

Since Jan 10Pushed 8y ago1 watchersCompare

[ Source](https://github.com/Th3Mouk/PokemonGo-IV-Calculator)[ Packagist](https://packagist.org/packages/th3mouk/pokemongo-iv-calc)[ RSS](/packages/th3mouk-pokemongo-iv-calc/feed)WikiDiscussions master Synced 2mo ago

READMEChangelog (5)Dependencies (5)Versions (16)Used By (0)

Pokemon Go IV Calculator
========================

[](#pokemon-go-iv-calculator)

This PHP library is the most accurate to calculate Pokemons IV's.

[![Latest Stable Version](https://camo.githubusercontent.com/1d5bfc0ba0901ededbcef868df19e4d35d03285d2f34b8d2f54566c12ad32f5a/68747470733a2f2f706f7365722e707567782e6f72672f7468336d6f756b2f706f6b656d6f6e676f2d69762d63616c632f762f737461626c65)](https://packagist.org/packages/th3mouk/pokemongo-iv-calc) [![Latest Unstable Version](https://camo.githubusercontent.com/734bace9f39522873b300a440706e3a17d7109ddf142f958bab689f3992523ec/68747470733a2f2f706f7365722e707567782e6f72672f7468336d6f756b2f706f6b656d6f6e676f2d69762d63616c632f762f756e737461626c65)](https://packagist.org/packages/th3mouk/pokemongo-iv-calc) [![Total Downloads](https://camo.githubusercontent.com/b5cfd6a07d9a59c7fc815d98570e79c5f6b8e0530783a156613885ae4ff99957/68747470733a2f2f706f7365722e707567782e6f72672f7468336d6f756b2f706f6b656d6f6e676f2d69762d63616c632f646f776e6c6f616473)](https://packagist.org/packages/th3mouk/pokemongo-iv-calc) [![License](https://camo.githubusercontent.com/a8ed1553c55f988c987dd0126256e8f0e24d619605e2c1e16a433aef39f39556/68747470733a2f2f706f7365722e707567782e6f72672f7468336d6f756b2f706f6b656d6f6e676f2d69762d63616c632f6c6963656e7365)](https://packagist.org/packages/th3mouk/pokemongo-iv-calc)

[![SensioLabsInsight](https://camo.githubusercontent.com/31771fad236b6c7b0df52bb77225fc4d8edd6ef5b8544cd4880bfd49f6bef47c/68747470733a2f2f696e73696768742e73656e73696f6c6162732e636f6d2f70726f6a656374732f38393439373731622d316537612d343337662d613233392d3163356638616464623735642f6d696e692e706e67)](https://insight.sensiolabs.com/projects/8949771b-1e7a-437f-a239-1c5f8addb75d) [![Build Status](https://camo.githubusercontent.com/b0151ac32c90bb02b6030f8e91931769e630c1a660a6c4c1c0f6677cf2750e3b/68747470733a2f2f7472617669732d63692e6f72672f5468334d6f756b2f506f6b656d6f6e476f2d49562d43616c63756c61746f722e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/Th3Mouk/PokemonGo-IV-Calculator) [![Scrutinizer Code Quality](https://camo.githubusercontent.com/87b2d750e86deb611ef51d85ff12201ca9937755a593252134bcc7b8e724d193/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f5468334d6f756b2f506f6b656d6f6e476f2d49562d43616c63756c61746f722f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/Th3Mouk/PokemonGo-IV-Calculator/?branch=master)

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

[](#installation)

`composer require th3mouk/pokemongo-iv-calc`

Usage
-----

[](#usage)

### From command line

[](#from-command-line)

```
php bin/ivcalculator calculate bulbasaur 515 59 2500 4 3 def

php bin/ivcalculator calculate bulbasaur xxx xx 2500 4 3 def atk hp
```

### Use the class

[](#use-the-class)

```
$pokemon = (new Calculator())->calculate(
    $input->getArgument('name'),
    (int) $input->getArgument('cp'),
    (int) $input->getArgument('hp'),
    (int) $input->getArgument('dusts'),
    (int) $input->getArgument('global'),
    (int) $input->getArgument('max-stats'),
    $input->getArgument('bests'),
    (bool) $input->getOption('upgraded')
);
```

To manipulate different IV combinaisons I use [Illuminate\\Collection](https://github.com/tightenco/collect).

So `pokemon->getIvCombinaisons()` will return a Collection easily manipulable.

### Parameters:

[](#parameters)

- Name of the pokemon in english 🇬🇧
- CP
- HP
- Dusts
- 1/2/3/4 [see steps here](https://pokemongo.gamepress.gg/pokemon-appraisal)
- 1/2/3/4 [see steps here](https://pokemongo.gamepress.gg/pokemon-appraisal)
- Finish the command with stats given by the coach (`atk` and/or `def` and/or `hp`)

Where :

`1` is the worst appreciation (&lt;8 for an IV or &lt;50% for global)

And

`4` is the best range (15 for an IV or &gt;80% global IV)

Helpers
-------

[](#helpers)

Simply use static Helper with in first argument the pokemon level and second your trainer level.

### Dusts calculator

[](#dusts-calculator)

```
Helpers::dustsToMax(20.5, 20)
```

### Candies calculator

[](#candies-calculator)

```
Helpers::candiesToMax(23, 27)
```

### CP calculator

[](#cp-calculator)

```
Helpers::calculateCP(238, 184, 171, 29, true)
```

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

[](#contributing)

Before commiting, please run `vendor/bin/php-cs-fixer fix .` command, and update the test suite.

To launch the test suite:

```
php vendor/bin/peridot tests
```

Please
------

[](#please)

Feel free to improve this library.

###  Health Score

30

—

LowBetter than 64% of packages

Maintenance18

Infrequent updates — may be unmaintained

Popularity16

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity66

Established project with proven stability

 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.

###  Release Activity

Cadence

Every ~20 days

Recently: every ~62 days

Total

15

Last Release

3116d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/5f31e3a808a4f015ebad005caa64866fc90e39475151fc95ef1e11f774d35505?d=identicon)[Th3Mouk](/maintainers/Th3Mouk)

---

Top Contributors

[![Th3Mouk](https://avatars.githubusercontent.com/u/5006899?v=4)](https://github.com/Th3Mouk "Th3Mouk (29 commits)")

---

Tags

calculatorhacktoberfestiviv-calculatorlegitpokemonpokemongocalculatorpokemonPoGopokemon goiv calculatorpogo iv

###  Code Quality

Code StylePHP CS Fixer

### Embed Badge

![Health badge](/badges/th3mouk-pokemongo-iv-calc/health.svg)

```
[![Health](https://phpackages.com/badges/th3mouk-pokemongo-iv-calc/health.svg)](https://phpackages.com/packages/th3mouk-pokemongo-iv-calc)
```

###  Alternatives

[markrogoyski/ipv4-subnet-calculator

Network calculator for subnet mask and other classless (CIDR) network information.

177813.7k6](/packages/markrogoyski-ipv4-subnet-calculator)[php-soap/wsdl

Deals with WSDLs

173.5M12](/packages/php-soap-wsdl)[ballen/distical

A distance (Lat/Long) calculation library for PHP

40180.2k2](/packages/ballen-distical)[aedart/athenaeum

Athenaeum is a mono repository; a collection of various PHP packages

255.2k](/packages/aedart-athenaeum)

PHPackages © 2026

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