IP Subnet Calculator

Calculate the network, broadcast address, host range and masks of any IPv4 CIDR block — and split it into smaller subnets.

Examples:

Subnet details

CIDR notation
192.168.1.0/24
Network address
192.168.1.0
Broadcast address
192.168.1.255
Subnet mask
255.255.255.0
Wildcard mask
0.0.0.255
First usable host
192.168.1.1
Last usable host
192.168.1.254
Total addresses
256
Usable hosts
254
Address type
Private (RFC 1918)
Legacy class
C
Address in hex
0xC0A8010A

Binary view

Blue bits are the network part (24 bits), grey bits the host part (8 bits).

Address11000000.10101000.00000001.00001010
Mask11111111.11111111.11111111.00000000
Network11000000.10101000.00000001.00000000
Broadcast11000000.10101000.00000001.11111111

Split into subnets

What the subnet calculator does

An IPv4 address has 32 bits. A prefix length such as /24 says how many of those bits identify the network; the rest number the hosts inside it. Working out the boundaries by hand means converting to binary, ANDing with the mask and counting — easy to get wrong when you are configuring a VPC, a firewall rule or a DHCP scope. This calculator does the bit arithmetic for you and shows every value you normally need, plus a binary view so you can see why the answer is what it is.

How to use it

  1. Type an address into IP address (or CIDR). Any address inside the network works, e.g. 192.168.1.10.
  2. Pick the Prefix / subnet mask from the list — or type it directly in the address field as /20 or as a mask: 172.16.5.4 255.255.240.0.
  3. Read the Subnet details and Binary view; they update as you type. Press Copy to copy them as text.
  4. To carve the network up, choose a size under Split into subnets. The subnet containing your address is highlighted; Copy as CSV exports the table.

Worked example

Entering 172.16.5.4 255.255.240.0 gives:

CIDR notation      172.16.0.0/20
Broadcast address  172.16.15.255
Subnet mask        255.255.240.0
Wildcard mask      0.0.15.255
Usable hosts       172.16.0.1 – 172.16.15.254 (4,094)
Address type       Private (RFC 1918)

Splitting that /20 into /22 networks gives four subnets: 172.16.0.0/22, 172.16.4.0/22 (highlighted, because 172.16.5.4 is in it), 172.16.8.0/22 and 172.16.12.0/22, each with 1,022 usable hosts.

What each value means

  • Network address — the address with all host bits set to 0. It names the subnet and is used in routing tables.
  • Broadcast address — all host bits set to 1. Packets sent there reach every host on the subnet, so it cannot be assigned to a device.
  • Usable hosts — total addresses minus network and broadcast. Exceptions: a /31 has 2 usable addresses (RFC 3021 point-to-point links) and a /32 is a single host route.
  • Wildcard mask — the inverted subnet mask, used by Cisco ACLs and OSPF.
  • Address type — whether the address is public or in a special range: private (RFC 1918), carrier-grade NAT, loopback, link-local, documentation, multicast or reserved.
  • Legacy class — the pre-1993 classful category (A, B, C, D, E) based on the first octet. Routing has ignored classes since CIDR, but exam questions and old documentation still use them.

Limitations

  • IPv4 only. IPv6 subnetting is not supported.
  • The split table shows the first 256 subnets; the total count is always shown. Splitting is into equal-size subnets — for variable-length (VLSM) designs, split, then recalculate individual blocks.
  • Cloud providers reserve extra addresses in each subnet (AWS reserves 5, Azure 5), so the real usable count there is lower than shown.

Tips and common mistakes

  • Leading zeros such as 192.168.001.010 are rejected on purpose: some systems read them as octal, which silently changes the address.
  • Plan with room to grow — moving from a /24 to a /23 later means renumbering, while unused space in a bigger block costs nothing in private ranges.
  • Avoid 192.168.0.0/24 and 192.168.1.0/24 for VPN-connected offices; they collide with most home routers.
  • To see who owns a public address, use IP Address Lookup.

Frequently Asked Questions

How many usable hosts are in a /24?

A /24 has 256 addresses. The first is the network address and the last is the broadcast address, so 254 can be assigned to hosts.

Why does a /31 show 2 usable hosts?

RFC 3021 allows /31 networks on point-to-point links, where no network or broadcast address is needed, so both addresses are usable. Most modern routers support it.

What is a wildcard mask?

It is the bitwise inverse of the subnet mask (0.0.0.255 for a /24). Cisco ACLs and OSPF network statements use wildcard masks instead of subnet masks.

Can I enter a subnet mask instead of a prefix?

Yes. Type '172.16.5.4 255.255.240.0' or '172.16.5.4/255.255.240.0' in the address field. The mask must be contiguous (all ones followed by all zeros); masks like 255.0.255.0 are rejected.

Does it support IPv6?

No, this calculator handles IPv4 only. IPv6 input is detected and rejected with a message rather than producing wrong numbers.

Is anything sent to a server?

No. All calculations run in your browser with plain JavaScript; the addresses you enter never leave your device.