Skip to main content

Semver Calculator

Test npm-style version ranges (^1.2.3, ~1.2.0, >=1 <2), see which versions match, bump a version, and compare or sort versions. Private.

1.9.0 matches ^1.2.3.

The range

  • Written out>=1.2.3 <2.0.0-0
  • Lowest version allowed1.2.3

Next version

1.9.0 → 1.10.0

1.9.0 is lower than 1.10.0 (minor difference).

Sort a list

1.2.0-beta.2
1.2.0
1.9.0
1.10.0
2.0.0-rc.1

Highest version that matches ^1.2.3: 1.10.0

Shortcuts: Ctrl+Enter run · Ctrl+Shift+C copy result · / search (use ⌘ on Mac)

Free Online Semver Calculator and Range Tester

Check whether a version fits a range such as ^1.2.3, see the range written out in full, work out the next version, and sort a list of versions the way npm does. It gives developers a quick browser-based way to solve a focused semver calculator task before moving the result into a project.

How to test a range

Type a range and a version. You see at once whether it matches and how the range expands, for example ^1.2.3 is >=1.2.3 <2.0.0-0.

Bump, compare and sort

Choose a release type to get the next version. Paste a list of versions to sort it, and see the highest one that fits your range.

Common mistakes

  • Reading versions as decimals: 1.10.0 is higher than 1.9.0, because each part is a separate number.
  • Expecting ^ to behave the same below 1.0.0: for 0.x versions it allows only patch updates (or minor within 0.0.x).

Frequently asked questions

What does ^1.2.3 mean?
Any version from 1.2.3 up to, but not including, 2.0.0: it allows new features and fixes but not breaking changes. For 0.x versions the caret is stricter: ^0.2.3 allows 0.2.3 up to 0.3.0.
What does ~1.2.3 mean?
Any 1.2.x version from 1.2.3 up: fixes only. The tilde is stricter than the caret.
Why is 1.3.0-beta.1 not matched by ^1.2.3?
Ranges skip pre-release versions unless the range itself names a pre-release of the same version. This keeps unstable builds out of normal installs.
When do I bump major, minor or patch?
Major for breaking changes, minor for new features that keep working code working, patch for bug fixes. A pre-release version such as 2.0.0-rc.1 comes before 2.0.0.
How do I use this semver calculator tool?
Use the interactive controls above; processing stays in your browser and the result is intended as a practical starting point for development work.

More DevOps & Network

View all DevOps & Network tools →