Subnet Calculator

Calculates network, mask and hosts for an IPv4/IPv6 block, plus VLSM and route aggregation.

What CIDR is

CIDR (Classless Inter-Domain Routing, RFC 4632) is the "address/prefix" notation (e.g. 192.168.1.0/24) that replaced the fixed A/B/C classes of the 1980s — the number after the slash is the number of bits, counted from the left, that belong to the NETWORK portion of the address; the rest is the HOST portion. The larger the prefix, the smaller the block (more network bits, fewer left for hosts) — a /24 has 8 host bits (256 addresses), a /25 has only 7 (128 addresses), half as many.

Subnet mask vs. wildcard mask

Both describe the exact same network/host boundary, just bit-inverted from each other: the subnet mask (255.255.255.0 on a /24) has the NETWORK bits turned on; the wildcard mask (0.0.0.255 on the same /24) has the HOST bits turned on — it's the native notation of Cisco ACLs ("which bits to ignore when matching"). This tool accepts both in Mode 1's mask field and automatically recognizes which one you typed.

Classes A/B/C/D/E — why they still show up

Before CIDR (1993), every IPv4 address belonged to a fixed class that already determined the block size: Class A (1-126, /8, 16 million addresses), Class B (128-191, /16), Class C (192-223, /24), Class D (224-239, reserved for multicast), and Class E (240-255, reserved). The system wasted address space massively (a company with 300 hosts needed an entire /16, 65 thousand addresses, because nothing existed between /16 and /24) and was abandoned — CIDR allows any prefix. The historical class shown by this tool is only a curiosity/reference, never a basis for any calculation.

VLSM — Variable Length Subnet Masking

VLSM means splitting a network into subnets of DIFFERENT sizes, each exactly the size its demand needs — unlike the equal split (Mode 3, "Split evenly" variant), which always produces same-size blocks. This tool's algorithm is the classic one from networking courses: allocate the largest demands first, each into the next available space already aligned to its own size — allocating smallest-first would waste more space to alignment. The order you type the demands in doesn't affect the result, only the display order.

Why IPv6 behaves differently here

IPv6 has no broadcast address (RFC 4291) — multicast replaces every use broadcast had in IPv4. By near-universal convention, every IPv6 subnet meant for hosts is a /64 (the final 64 bits form the interface identifier, used by SLAAC for auto-configuration, RFC 4862) — a prefix longer than /64 breaks that auto-configuration, which is why the tool warns about it (without blocking: point-to-point links (/127, RFC 6164) and manual allocation are legitimate uses).

Special cases: /31 and /32

A normal IPv4 block reserves the first address (network) and the last one (broadcast), leaving N-2 usable — but a /30 (4 addresses) would only leave 2 usable, and a point-to-point link (router-to-router) only ever needs exactly 2 addresses. RFC 3021 solves this: a /31 has exactly 2 addresses, and BOTH are usable (no reserved network or broadcast) — the most efficient choice for a point-to-point link. A /32 is even more specific: a one-address block (a single-host route), always with that one address counted as "usable".

Frequently asked questions

No — it's an address-math calculator with no visibility into any real network topology. It never substitutes for an IPAM (IP Address Management) tool, and never queries any router, switch, or DHCP server.

It's the RFC 3021 special case (see "Special cases" above) — designed specifically for point-to-point links, where reserving a network and broadcast address would waste half of a block that only has 2 addresses to begin with.

"Split evenly" generates subnets that are all the SAME size (you choose how many, or the new prefix directly). VLSM accepts a list of demands of DIFFERENT sizes (e.g. 100, 50, 25, and 10 hosts) and allocates each into the smallest block that fits it — largest subnets first, to minimize alignment waste.

It means the smallest single block able to contain every block you entered also includes addresses that were NOT in your original list — normal when the input blocks aren't neighboring/aligned enough to merge without leftovers. The "merged blocks" list (above the supernet, in the result) is always the exact representation; the single supernet is only a reference for "which one route announcement would cover everything".

Only as a reference/curiosity — plenty of study material and certification content still cites the classes, and quickly recognizing "192.168.x.x is Class C" helps place an address at a glance. The tool never uses the class to calculate anything; CIDR (the prefix you typed) is always the single source of truth.

No — all the math (parsing, masking, VLSM, aggregation) runs 100% in your browser. No network request is ever made, not even for the example addresses.

A limitation of this version — the embedded form is rare in manual subnet-calculator use (it shows up mostly in internal network stacks, not in address-planning work) and would add support for one more input format without real value for the tool's main use case. Type the address in plain hexadecimal (e.g. ::ffff:c0a8:101) for the same result.