Skip to main content
MyIPKit— Your network, explained.

IPv4 Subnet Calculator

Work out the network and broadcast addresses, usable host range, masks and binary form for any IPv4 block.

Runs entirely in your browser — nothing is sent anywhere

Any address inside the block.

Accepts 24, /24 or 255.255.255.0.

Examples:

Runs entirely in your browser — nothing is sent anywhere

How to use this tool

Enter any address inside the block and the prefix length. The result updates as you type. The prefix field accepts a CIDR length (24) or a dotted-quad mask (255.255.255.0) — whichever you have to hand.

What the numbers mean

Network and broadcast address

The network address is the block’s first address, with every host bit set to zero. The broadcast address is the last, with every host bit set to one. Neither is assignable to a host in a conventional subnet.

Subnet mask and prefix length

They express the same thing two ways. The prefix length counts how many leading bits identify the network; the subnet mask writes those bits out as a dotted-quad. A /24 and 255.255.255.0 are identical.

A subnet mask must be a contiguous run of ones followed by zeros. Something like 255.0.255.0 is not a valid mask, and this calculator rejects it rather than silently reinterpreting it.

Binary view

Lining the address up against the mask in binary makes the split obvious: everything above the boundary is the network, everything below is the host.

The /31 and /32 special cases

A /32 describes exactly one address — a single host route, a loopback interface, or one entry in a firewall rule. There is no range and nothing to reserve.

A /31 would normally leave zero usable addresses under the usual rule. RFC 3021 makes an exception for point-to-point links: on a link with exactly two endpoints there is no need for a broadcast address, so both addresses are usable.

Limitations

  • This release covers IPv4. IPv6 subnetting follows different conventions — the CIDR calculator already handles IPv6 ranges.
  • The “usable hosts” figure follows the traditional rule. Some equipment and some configurations treat the all-zeros and all-ones subnets differently.

Why are two addresses not usable in a normal subnet?

The first address in a block identifies the network itself and the last is the broadcast address for that network. Neither can be assigned to a host, so a /24 with 256 addresses offers 254 usable ones.

What is a /31 for?

RFC 3021 allows a /31 on point-to-point links, where there are only ever two endpoints and no need to broadcast. Both addresses are usable. It halves the address waste of using a /30 for every router-to-router link.

What is a wildcard mask?

It is the bitwise inverse of the subnet mask: 0.0.0.255 rather than 255.255.255.0. Cisco-style access control lists and some routing protocol statements are written with wildcard masks instead of subnet masks.