Version Calculator

Version Comparison

Last updated

What Is Semantic Versioning?

Semantic Versioning (SemVer) is a versioning scheme that uses three numbers: MAJOR.MINOR.PATCH (e.g., 2.4.1). Each number has a specific meaning: MAJOR changes when you make incompatible API changes, MINOR changes when you add functionality in a backward-compatible manner, and PATCH changes when you make backward-compatible bug fixes.

SemVer Rules

Change TypeVersion BumpExample
Breaking API changeMAJOR1.5.3 → 2.0.0
New feature (backward-compatible)MINOR1.5.3 → 1.6.0
Bug fixPATCH1.5.3 → 1.5.4
Pre-releaseSuffix2.0.0-alpha.1
Build metadataSuffix2.0.0+build.123

SemVer Range Syntax (npm)

Text
^1.2.3   → >=1.2.3 <2.0.0  (compatible with 1.x.x)
~1.2.3   → >=1.2.3 <1.3.0  (patch updates only)
1.2.3    → exactly 1.2.3
>=1.2.3  → 1.2.3 or higher
1.2.x    → any patch version of 1.2
*        → any version
1.x      → any minor/patch of major 1

// JavaScript: compare versions with semver library
import semver from 'semver';

semver.satisfies('1.5.3', '^1.2.0');  // true
semver.gt('2.0.0', '1.9.9');          // true
semver.inc('1.5.3', 'minor');         // '1.6.0'
semver.valid('1.2.3-alpha.1');        // '1.2.3-alpha.1'
semver.valid('not-a-version');        // null

Frequently Asked Questions

Yes, our Semver Calculator is completely free with no registration required. Use it unlimited times without any restrictions.

Yes, all processing happens locally in your browser. Your data never leaves your device and is not stored on our servers.

No installation needed. The tool works directly in your web browser on any device.

Enter your input, click the action button, and get instant results. Copy the output for use in your projects.