Understanding Semantic Versioning
Semantic versioning provides a clear, predictable system for communicating the nature of changes in each release. The three-number format MAJOR.MINOR.PATCH tells users exactly what to expect when upgrading. A patch bump means bug fixes only. A minor bump means new features without breaking changes. A major bump signals that existing code may need updates to work with the new version.
This calculator takes your current version and the type of change you made, then calculates the correct next version. Major bumps reset minor and patch to zero. Minor bumps reset only patch to zero. Patch bumps increment only the patch number. Optional pre-release identifiers and build metadata can be appended for pre-release and CI workflows.
Version Bump Rules
When you bump the major version, both minor and patch reset to zero. Version 1.5.3 with a major bump becomes 2.0.0. When you bump the minor version, only patch resets. Version 1.5.3 with a minor bump becomes 1.6.0. A patch bump simply increments the last number: 1.5.3 becomes 1.5.4. These rules ensure that version numbers always increase and that the bump type accurately reflects the nature of the changes.
Pre-release Versions
Pre-release identifiers like alpha, beta, and rc (release candidate) are appended after the patch number with a hyphen. They indicate that the version is not yet stable. Pre-release versions have lower precedence than the normal version, so 2.0.0-alpha comes before 2.0.0. Use them to distribute early versions for testing before committing to an official release.
Build Metadata
Build metadata is appended with a plus sign and is ignored when comparing versions. Use it to record build numbers, commit hashes, or timestamps. Two versions that differ only in build metadata (1.0.0+abc and 1.0.0+def) are considered equal in precedence. This makes build metadata useful for internal tracking without affecting version ordering.
Frequently Asked Questions
What is semantic versioning?
A MAJOR.MINOR.PATCH scheme where major = breaking changes, minor = new features, patch = bug fixes.
When to bump major?
When making incompatible API changes. Resets minor and patch to zero. Signals users may need code changes.
When to bump minor?
When adding backward-compatible features. Resets patch to zero. Users can upgrade safely.
What are pre-release identifiers?
Tags like alpha.1 or beta appended with a hyphen (2.0.0-alpha). Indicate unstable versions for testing.
What is build metadata?
Information appended with + (1.0.0+build.123). Ignored in version precedence; used for internal tracking.
Save your results & get weekly tips
Get calculator tips, formula guides, and financial insights delivered weekly. Join 10,000+ readers.
No spam. Unsubscribe anytime.