Rules · sources · cross-checks
Calculation Rules and Verification
Every number on this site comes from rules that can be checked. This page lists the rules, the sources and retrieval dates, the tools used to cross-check the engine, and the cases where other tools legitimately disagree.
Rules the calculators follow
- /31 (IPv4)
- Both addresses are usable and there is no broadcast, per RFC 3021. The VLSM planner still assigns a /30 to a two-host request unless you enable /31 explicitly.
- /32 (IPv4)
- A single host route: one address, no network or broadcast distinction.
- IPv6 usable count
- No broadcast address exists. Every address in the prefix counts as usable, including the subnet-router anycast address, which is why the count differs from tools that subtract it.
- IPv6 text form
- Output follows RFC 5952: lowercase hex, leading zeros dropped, longest zero run replaced with
::, and mixed notation for IPv4-mapped addresses. - VLSM planning
- IPv4 only. Requests are placed largest first, ties keep input order, and each block is aligned to its own size. Two-host requests get /30 by default or /31 with the option on.
- Splitting
- A prefix split needs an explicit positive limit. Requests above the limit fail before anything is generated, so a partial list is never presented as complete.
- Ambiguous masks
0.0.0.0and255.255.255.255are valid as both netmask and wildcard. They are read as a netmask and the result is flagged, with a control to read them the other way.- Input errors
- Invalid or incomplete input disables copy, download and export controls until it is fixed, so a stale result cannot be used by accident. Share links stay available and reproduce exactly the inputs currently in the page, so a broken input can be shared for review without being presented as a valid result.
Sources and retrieval dates
Address classification (private, documentation, link-local, multicast, and so on) uses snapshots of the IANA special-purpose registries, retained in the repository with their exact contents and hashes.
- IANA IPv4 registry
- 26 special-purpose blocks
- IANA IPv6 registry
- 25 special-purpose blocks, plus 3 supplementary well-known blocks
- Retrieved
- 2026-10-02 (UTC), downloaded directly from IANA
- IPv4 source
- https://www.iana.org/assignments/iana-ipv4-special-registry/iana-ipv4-special-registry-1.csv
- IPv6 source
- https://www.iana.org/assignments/iana-ipv6-special-registry/iana-ipv6-special-registry-1.csv
- Shared test vectors
- 232 vectors across 9 files, each with at least two independent validators
Retained SHA-256 hashes
- IPv4 CSV
e3e39e76d00b1677335db8e9a805c7b9480ea2f4dc9e33f0b93cd3a905128d73- IPv6 CSV
775feea0621dec8735a44fbf30f762e721e8f0a1b3ab7eb341961a88cfce2139
How results are cross-checked
The engine has one shared set of test vectors, and the same vectors are replayed against independent implementations. A vector is only accepted when at least two independent validators agree, and each vector records which fields were actually checked by which tool. The recorded verification run used CPython 3.13.15 (ipaddress), netaddr 1.3.0, Perl ipcalc 0.51 and ipv6calc 4.4.0, with sipcalc installed in CI. The retained IANA CSV snapshots are checked offline against the registry fields.
Run the checks yourself:
npm test # the full Node test suite npm run crosscheck # re-verify every vector with the independent tools
Reproducible examples live in the vectors themselves and on the tool pages. Every result links back to the inputs that produced it: open 192.168.1.37/26, 10.0.0.0/31 or 2001:db8:abcd::/48 and the page shows the same value with its rule.
Known differences from other tools
- IPv6 host counts. Python's
hosts()excludes the subnet-router anycast address; SubnetCalc counts the full range. The cross-check compares Python's network range instead. - /31 in VLSM. The planner is a policy layer: it prefers /30 for two hosts unless you enable RFC 3021 mode. Other tools may default differently.
- Reversed ranges. netaddr accepts a start after the end by swapping; SubnetCalc rejects the input instead of guessing.
- New IANA allocations. A recent registry entry can be missing from a tool with a bundled older table. The retained IANA snapshot is authoritative for classification fields.
- Application policy errors. Mixed IP versions, missing split limits and capacity failures are reported with SubnetCalc's own error codes; comparison tools validate only their own concerns.
Reporting an error
If a result looks wrong, include the exact input, the value you expected, and the rule or source you are comparing against. Open an issue at github.com/heymi/Subnetcalc/issues; the vectors behind the result make the case reproducible.
For what the site stores and what a share link contains, read the privacy note.