App Version Code Calculator
Convert between semantic version strings (1.2.3) and Android versionCode integers. Calculate version codes for Google Play, plan version increments, and compare versioning strategies — all in your browser.
How App Version Codes Work
Every Android app submitted to Google Play requires two version identifiers: a human-readable versionName (like "1.2.3") and a machine-readable versionCode (an integer like 10203). The versionCode is what Google Play uses internally to determine whether one version is newer than another. It must strictly increase with each release — you cannot upload an APK or AAB with a versionCode equal to or lower than the current published version.
Google Recommended Formula
The most common strategy is: versionCode = MAJOR × 10000 + MINOR × 100 + PATCH. For example, version 1.2.3 becomes 10203. This supports up to 99 minor versions and 99 patch versions per major release, which is sufficient for most apps.
Versioning Strategies Explained
The Google recommended formula (MAJOR×10000 + MINOR×100 + PATCH) is the most widely used because it is simple, predictable, and leaves plenty of room for growth. Each component can range from 0 to 99 before colliding with the next segment.
The large-scale formula (MAJOR×1000000 + MINOR×1000 + PATCH) gives each segment more headroom — up to 999 minor and patch versions. This is useful for apps with frequent releases or those following a rapid iteration cycle. However, the versionCode grows faster and approaches Android's maximum integer limit sooner.
The sequential strategy simply increments from 1, 2, 3, and so on. This is the simplest approach but provides no insight into the semantic version from the code alone. Many smaller apps use this method since it requires no calculation.
The date-based strategy uses the format YYYYMMDD (for example, 20260317 for March 17, 2026). This is popular for apps with daily or weekly releases, as the date naturally increases and immediately tells you when the build was created.
Cross-Platform Version Mapping
iOS uses CFBundleShortVersionString for the user-facing version and CFBundleVersion for the build number. Flutter combines both into a single version field in pubspec.yaml using the format "1.2.3+10203" where the part after the plus sign is the build number. React Native, Kotlin Multiplatform, and other cross-platform frameworks all need to manage these platform-specific version fields, making a consistent calculation strategy essential.
Best Practices for Version Management
Always increment the versionCode for every release, even for hotfixes. Use a consistent strategy across your team to avoid confusion. Document your versioning scheme in your project README. Consider automating version code calculation in your CI/CD pipeline to prevent human error. Remember that Android's versionCode is a 32-bit integer with a maximum value of 2,147,483,647 — plan your strategy accordingly.
Privacy Note
All calculations run entirely in your browser. No version data is sent to any server. This tool works offline once loaded.