-
Notifications
You must be signed in to change notification settings - Fork 0
IV Calculator
The IV Calculator at /iv finds every possible individual value (IV) spread for a Pokémon given its CP, HP, stardust upgrade cost, and optionally its appraisal rating. Guests can use the Manual tab freely; logged-in users also get a Screenshot tab (OCR scan) and a saved Pokémon box.
- Search for a Pokémon by name with the sprite picker. The picker is form-aware: regional variants (Alolan, Galarian, Hisuian, etc.) and other named forms appear as distinct entries so you can select the exact one you caught.
- Enter the CP and HP shown on the Pokémon's summary screen.
- Enter the Stardust Cost exactly as shown on the Power Up button. Do not adjust it yourself for Lucky, Shadow, or Purified; the status toggles below tell the server to do that for you.
- Set your Trainer Level. This caps the maximum level the Pokémon can be at (wild catches are capped at trainer level + 2). For logged-in users this is pre-filled from your profile.
- Turn on any Pokémon Status toggles that apply: Lucky, Shadow, or Purified. The stardust number on the Power Up button already reflects that status, so the server applies the matching discount when it works out the level (Lucky halves the dust, Shadow costs more, Purified costs less, and Lucky plus Purified stacks). Entering the raw on-screen number and letting the server do the maths is more accurate than the old approach, and it fixes the high-level stardust brackets (roughly level 41 to 50).
- Optionally pick the Top Stat shown in the appraisal screen (Attack / Defense / Stamina) and the Appraisal Rating (0-3 stars). Both narrow the candidate pool; leaving either on "Unknown / Skip" keeps all possibilities.
- Hit Find IVs.
The results table lists every matching spread sorted by IV percentage (descending), then level (ascending). If only one spread matches the row is highlighted and labelled "Definitive". Each row shows ATK / DEF / STA / Level / IV% / CP / HP.
Best Buddy handling. A Best Buddy Pokémon displays its stats one level higher than its real level, which can stop any spread from matching. If the first pass finds nothing, the calculator retries on the assumption that the Pokémon is a Best Buddy. When that assumption produces the results, the result notes say so.
Logged-in users see a Save to Box button per row. Clicking it saves that specific spread (including the full candidate set) to your Pokémon box for later reference.
Upload a JPEG or PNG screenshot of the Pokémon's stats screen. The backend runs several extraction passes before returning the same candidates table as the Manual tab.
Text is read by a neural OCR microservice (ocr-service/, RapidOCR), the same class of recognition the mobile app uses, called over HTTP at OCR_SERVICE_URL (see Configuration). Tesseract is no longer used.
CP extraction uses two passes: first it scans the top 25% of the image for a number preceded by "CP"; if that fails or produces an implausible value it retries with a contrast-enhanced crop of the top 18%. If both text passes fail, a pixel arc-scan fallback traces the white horseshoe CP arc (with a camera-icon exclusion zone to avoid false positives on some Pokémon silhouettes). A plausibility guard throws out a text-detected CP that is impossible for the species (above its maximum, with a little headroom allowed for Best Buddy) and treats it as a misread rather than trusting it.
Level arc reader. A dedicated reader works out the Pokémon's exact level from the position of the white dot on the level arc, calibrated per image and independent of species. When it succeeds, the extracted data carries an arc level and the results card shows an Arc level: X badge together with a "Level read from arc" note. If the CP text is misread but the arc gives a confident level, the scanner performs an arc rescue: it discards the bad CP and solves from the arc level instead, and the notes flag that this happened.
Name detection uses three strategies in priority order: (1) the "This [name] was caught in..." footer text, which is the most reliable; (2) a "[name] MEGA ENERGY" line for Mega Pokémon; (3) a crop of the card zone as a last resort.
Candy-line species identification. When a Pokémon has been nicknamed so its species name cannot be read, the scanner falls back to the candy line (for example "3 MACHOP CANDY"). It works out the base species from the candy name, expands the full evolution family, then uses the CP, HP, and level to narrow down which member of that family you actually have. If more than one family member is still plausible, a species picker appears in the extracted card so you can choose the right one before recalculating.
Status detection scans the full image text for the words "Lucky", "Shadow", and "Purified". If none are found, it infers status from the raw dust cost (halved dust = Lucky, x0.9 = Purified, x6 = Shadow) and normalises the value back to the standard bracket before running IV calculations.
Appraisal stars are detected by scanning a horizontal band of orange pixels and finding the gaps between filled regions to distinguish 1, 2, and 3 stars. A rainbow shimmer pattern on the dots is also detected and flags the Pokémon as a 100% IV hundo.
After extraction, an editable card appears above the results showing the extracted CP, HP, dust, stars, and name alongside status badges (100% IV, Lucky, Shadow, Purified, Arc level, CP source, name source), plus the species picker when the candy line left more than one family member in play. You can correct any field and hit Recalculate without re-uploading the image. A hint reminds you that typing the CP when it was unreadable narrows the results down to the exact IV spread.
Result notes. Alongside the candidates the scanner surfaces short notes that explain what it did or how confident it is: whether the level was read from the arc, whether an arc rescue replaced a bad CP, whether a Best Buddy assumption was needed, a possible IV percentage range when the spread is ambiguous, and a truncation note ("showing the first N of M matches") because very large result sets are capped.
For logged-in users the trainer level is loaded automatically from your profile. OCR accuracy depends on screenshot quality; the screenshot should be taken directly from the game (not a photo of the screen). If results are wrong, edit the extracted fields or switch to the Manual tab.
A paginated list of every Pokémon you have saved (most recent first). Displays name, form, level, IV percentage, and CP. Each entry has a Delete button; deletion is immediate and permanent. The box header shows your current count against the 3000-entry limit.
Each account can store up to 3000 Pokémon. Attempting to save a 3001st returns HTTP 409 with {"error": "box is full (3000 Pokémon limit)"}. Delete old entries to free up space.
The page is ts/iv.ts; the calculation logic lives entirely on the server in internal/handlers/iv.go.
How candidates are found. enumerateIVs walks all 4096 IV combinations (ATK 0-15, DEF 0-15, STA 0-15) and every half-level from the dust bracket's minimum to min(dust_bracket_max, trainer_level + 2). For each combination it computes:
CP = max(10, floor((baseAtk + atkIV) * sqrt(baseDef + defIV) * sqrt(baseSta + staIV) * cpm^2 / 10))
HP = max(10, floor((baseSta + staIV) * cpm))
A combination is kept when both CP and HP match the input exactly AND the IV sum falls in the appraisal star range AND the top-stat constraint holds. Results are sorted by IV% descending then level ascending.
Dust brackets. Each bracket maps to a level range; a Pokémon's stardust upgrade cost tells you which range it falls in. 10 000 dust covers two adjacent ranges; the enumerator tests both. Levels go up in 0.5 steps from 1.0 to 51.0. Purified Pokémon have a dedicated 5 400 dust bracket covering levels 31-32. The maximum CP accepted is 50 000 (to accommodate Mega Pokémon).
Base stats and CP multipliers. Pulled from the PoGoAPI game data blob that is refreshed in the background (see Data Sources). The same data powers the DPS Calculator and the counter rankings on Raids and Counters. The CP multiplier table is extended past the game-data cutoff all the way up to level 51, including the XL half levels, so exact CP matching and the level-from-arc maths stay correct at the very top end.
Authentication. The POST /api/iv/calculate endpoint accepts unauthenticated requests so the Manual tab works for guests. OCR (POST /api/iv/ocr) and box operations require a session cookie or Bearer token. See API Reference for the full endpoint list.
Repository | Live site | hailsDotGO is a fan-made project, not affiliated with, endorsed by, or connected to Niantic or The Pokémon Company. Game data comes from community sources credited on the Data Sources page.
Start Here
Features
- Raids and Counters
- DPS Calculator
- IV Calculator
- PvP IV Ranker
- Events
- Shiny Tracking
- Trainer Directory
- Raid Finder
- Social Features
- Trust and Awards
- Bug Reports
- Player Reports
- Store
- Accounts and Roles
- Admin Guide
Self-Hosting
Development
Translations