Skip to main content

Semver Calculator

Parse, compare, and calculate semantic versions. Check if a version satisfies a range constraint (^, ~, >=), bump major/minor/patch, and break down version components. Follows the semver 2.0.0 spec.

✓ Compare two versions ✓ Range constraint checker ✓ Major/minor/patch bumper ✓ Runs 100% in your browser

Frequently Asked Questions

What is semantic versioning (semver)?▼

Semantic versioning (semver) is a version numbering convention using the MAJOR.MINOR.PATCH format. Increment MAJOR for breaking changes, MINOR for new backwards-compatible features, and PATCH for backwards-compatible bug fixes. For example, going from 1.2.3 to 2.0.0 signals a breaking change.

What does ^ mean in a semver range?▼

The caret (^) means 'compatible with' — it allows changes that do not modify the left-most non-zero version component. ^1.2.3 allows >=1.2.3 <2.0.0, so any 1.x.x version works. ^0.2.3 allows >=0.2.3 <0.3.0 because 0.x is the left-most non-zero digit.

What does ~ mean in a semver range?▼

The tilde (~) means 'approximately equivalent' — it allows patch-level changes if a minor version is specified. ~1.2.3 allows >=1.2.3 <1.3.0 (same minor, any patch). ~1.2 allows >=1.2.0 <1.3.0. This is more restrictive than ^ because it locks the minor version.

When should I bump major vs minor vs patch?▼

Bump MAJOR when you make incompatible API changes (removing a function, changing method signatures). Bump MINOR when you add backwards-compatible functionality (new methods, new optional parameters). Bump PATCH for backwards-compatible bug fixes only. Pre-release versions (1.0.0-alpha.1) and build metadata (1.0.0+build.1) are also part of the semver spec.

How do I check if a version satisfies a npm package range?▼

Use the Range Check tab. Enter the installed version (e.g. 1.5.3) and the constraint from package.json (e.g. ^1.0.0 or ~1.2.0 or >=1.0.0 <2.0.0). The calculator shows whether the version satisfies the range and explains why or why not.

Share this tool: X / Twitter LinkedIn
✓ 60,000+ developers use DevPlaybook ★★★★★ 4.8 / 5 on Gumroad ✓ MIT licensed · Instant download ✓ No login required

Related Products

on Gumroad

You Might Also Need

More Free Tools

Enjoying this tool? Get more like it.

Weekly developer tool guides, productivity playbooks & AI tricks. Free. No spam.

DevPlaybook Pro 7 days free

Unlock AI-Powered Dev Tools

  • ⚡ AI Code Review, Doc Generator & SQL Builder
  • ⚡ All premium templates & early access
  • ⚡ Member discounts on Gumroad products
Start Free Trial →

$9/mo after trial · Cancel anytime

Want the full toolkit?

Get DevPlaybook Pro

Every template, guide, boilerplate, and automation script in one bundle. 13 premium products — grab them all at once and save big.

$79
$241 separately Save $162 (67% off)
Get DevPlaybook Pro — $79 →

MIT licensed · Instant download · No subscription

See what's included → Browse all deals →