Free tool

Android versionCode Calculator

Choose a scheme, enter the version name, and get a versionCode that only ever increases — with the build.gradle.kts lines ready to paste.

What users see: major.minor.patch.

A label and a counter

Android apps carry two version fields that do unrelated jobs, and confusing them is a classic cause of a rejected Play upload.

The rule that follows: every upload needs a higher versionCode than any you have used before — higher, not different. Play remembers every code, including those from deleted releases and internal test tracks.

Choosing a scheme

SchemeExampleStrengthLimit
Counter14Cannot overflow or confuseSays nothing on its own
Semantic1.4.2 → 10402Readable from a crash reportMinor and patch cap at 99
Date260911Self-dating, sortableOne release per day
Date + build26091101Up to 100 builds a dayPasses the ceiling in 2042

Undecided? Use the counter. The code is not documentation; its one job is to go up. Semantic codes earn their keep when you want to read the release off a crash log without a lookup.

The 2,100,000,000 ceiling

Play refuses any version code above 2,100,000,000. A scheme such as yyyyMMddHH produces 2026091114 today — already too large. Any four-digit year followed by more than four digits breaks; the calculator flags it as soon as your inputs cross the line.

The mistake that costs a release cycle

"Version code N has already been used" has one exit: a bigger number. Two habits avoid it — bump the code in the same commit as the change rather than from memory at upload time, and if you use per-ABI splits, multiply your logical code by ten so the variants fit in the units digit.

What users experience

A higher code with a matching signature installs as an update and keeps data, databases and preferences. A lower or equal code is refused, which is why sideloading an older APK over a newer one fails with a downgrade or parse error. Uninstalling first works but wipes the app's data — and an APK signed with a different key can never update, whatever the numbers say.

In the HTML to App builder the version name and code are two fields on the package step, doing exactly these two jobs.

Frequently asked questions

versionCode vs versionName — which is which?

versionCode is the integer Android compares to rank builds; nobody sees it. versionName is the readable label on your listing; Android ignores it.

Does the code have to go up on every upload?

For Google Play, yes — higher than every code you have ever used, including deleted releases and test-track uploads.

What is the highest allowed versionCode?

2,100,000,000. Date schemes with a four-digit year and appended hours exceed it, so use a two-digit year or a plain counter.

Can I reuse a code after removing a release?

No. Play keeps the history for the life of the listing; a code is consumed the moment it is uploaded.

What should my first release use?

Code 1 and name 1.0 keeps the arithmetic obvious. A date code is fine too — only the must-increase rule is enforced.

Read next

Related tools

Ready to turn your site into an app?

Upload an HTML file or a ZIP, set your icon and name, and download a signed Android app. No Android Studio, no command line.

Open the builder