Calculators and converters Runs in your browser

Subnet calculator

Network, broadcast, mask and host range for any CIDR.

price
Free
account
Not needed
runs
In your browser
Ready

IPv4 or IPv6 in CIDR notation, like 10.0.0.0/8 or 2001:db8::/48. A mask works too: 192.168.1.10 255.255.255.0.

Try

What the subnet calculator shows

Type an address with a prefix length, such as 192.168.1.0/24 or 2001:db8::/48, and the calculator works out the whole block: the network address, the first and last usable address, the subnet mask and wildcard mask, and how many addresses and hosts it holds. You can also write the mask out in full, as in 192.168.1.10 255.255.255.0. If you enter an address from the middle of a block, the tool finds the network it belongs to.

For IPv4 there is a binary view that shows exactly where the network part of the address ends and the host part begins. Both IPv4 and IPv6 blocks can be split into smaller subnets of equal size, for example a /24 into four /26s.

How to read the result

  • Network address: the first address of the block, with all host bits set to zero. It names the subnet and isn't given to a device in IPv4.
  • Broadcast address: the last IPv4 address, with all host bits set to one. Packets sent to it reach every host on the subnet.
  • Usable hosts: the addresses left for devices. In IPv4 that's the total minus the network and broadcast addresses, so a /24 has 256 addresses and 254 usable hosts. A /31 is the exception: both of its addresses are usable on point-to-point links (RFC 3021). A /32 is a single address.
  • Subnet mask and wildcard mask: the mask has a one for every network bit, and the wildcard is its inverse. Router access lists and some firewall rules use the wildcard form.

IPv6 has no broadcast address, so the tool shows the first and last address of the block instead. IPv6 numbers get very large: one /64, the standard size for a single network segment, holds 18,446,744,073,709,551,616 addresses. The calculator uses exact integer math, so these counts are never rounded.

Common questions

What does the number after the slash mean?

It's the prefix length: how many bits at the start of the address identify the network. The remaining bits identify hosts. An IPv4 /24 leaves 8 host bits, which gives 256 addresses, and a /16 leaves 16 host bits, or 65,536 addresses. Each extra bit in the prefix halves the size of the block.

Which ranges are private?

In IPv4, 10.0.0.0/8, 172.16.0.0/12 and 192.168.0.0/16 are reserved for private networks (RFC 1918), and internet providers use 100.64.0.0/10 for carrier-grade NAT. In IPv6, unique local addresses start with fd. The calculator labels these and other special-purpose ranges, such as loopback, link-local and documentation blocks.

Why split a subnet?

To give separate networks to different groups of devices, such as servers, staff and guests, or to hand out blocks of a fixed size. Pick a longer prefix under "Split into smaller subnets" to list the resulting blocks. Turning an arbitrary start and end address into CIDR blocks is a different job: the IP range calculator does that.