DEV-TRAFFIC-105 · Calculator

SemVer Calculator & Range Tester

Validate and increment Semantic Versioning 2.0.0 versions, then test them against common npm-style range expressions.

EmbedReport issue
Ready · browser-local
Calculator

SemVer Calculator & Range Tester workspace

Supports exact versions, comparators, wildcards, tilde, caret, hyphen ranges, and ||.

Ready to calculate.Check a range and get the next major, minor, patch, and prerelease versions.
ProcessingBrowser-firstStorageNone by defaultAccessNo account required
WORKED EXAMPLE

SemVer Calculator & Range Tester example

Caret range ^1.2.0 admits compatible 1.x releases before 2.0.0.

Example input

Version: 1.4.2
Range: ^1.2.0

Expected output

1.4.2 satisfies ^1.2.0
Major: 2.0.0
Minor: 1.5.0
Patch: 1.4.3
Prerelease: 1.4.2-beta.0
INSTRUCTIONS

How to use SemVer Calculator & Range Tester

  1. 1

    Enter a complete semantic version such as 1.4.2.

  2. 2

    Enter a supported range such as ^1.2.0 or >=1.0.0 <2.0.0.

  3. 3

    Choose Calculate.

  4. 4

    Review the range verdict or select a suggested next version to use it as the new input.

PURPOSE

What this tool does

The calculator parses MAJOR.MINOR.PATCH versions with optional prerelease and build identifiers, compares precedence, and derives next major, minor, patch, or prerelease values.

The range tester supports exact versions, comparison operators, wildcards, tilde ranges, caret ranges, hyphen ranges, whitespace-separated intersections, and || unions.

SUPPORTED BEHAVIOR

Features and options

  • SemVer 2.0.0 validation
  • Prerelease precedence
  • Major, minor, patch, and prerelease increments
  • Caret and tilde ranges
  • Wildcards, comparators, hyphen ranges, and OR sets
IMPLEMENTATION NOTES

Technical information

Version precedence follows SemVer rules: major, minor, and patch are compared numerically; a normal release has higher precedence than its prerelease; prerelease identifiers compare numerically when both are numeric and lexically otherwise. Build metadata does not affect precedence.

Range syntax is a focused local implementation modeled on familiar package-manager notation. It is not the npm semver package and does not promise identical handling for every uncommon shorthand.

WHEN IT HELPS

Common use cases

  • Checking dependency compatibility
  • Planning a release increment
  • Comparing stable and prerelease versions
  • Explaining caret or tilde constraints
REVIEW BEFORE USING

Limitations

  • Only complete X.Y.Z versions are accepted as the version under test.
  • Loose parsing, coercion, tags such as latest, and every npm-specific edge case are not supported.
  • Prerelease versions must be explicitly admitted by the comparator set.
NEXT LOGICAL TASKS
AUTHORITATIVE MATERIAL

References & Sources

QUICK ANSWERS

SemVer Calculator & Range Tester FAQ

Does build metadata change precedence?

No. Values after + are preserved but ignored when versions are ordered.

Is this exactly the npm semver package?

No. It supports the common range forms listed above but is an independent browser-local implementation.

KEEP EXPLORING

More Tools in Package & Dependency Metadata

View all Package & Dependency Metadata tools →