Tools
Network

IP Subnet Calculator

Decode any IPv4 CIDR — network, broadcast, mask, wildcard, host range and total addresses.

Input

Dotted quad and prefix length. Any prefix from /0 to /32.

Network

192.168.1.0/24

Network
192.168.1.0
Broadcast
192.168.1.255
Mask
255.255.255.0
Wildcard
0.0.0.255
First host
192.168.1.1
Last host
192.168.1.254
Total addresses
256
Usable hosts
254
Class
C
Prefix
/24

mask = leading n ones · hosts = 2^(32−n) − 2 (except /31 and /32)

IPv4 only. /31 follows RFC 3021 (two hosts, point-to-point). /32 is a single host route.

How it works

  1. Type an IPv4 address with a prefix length — 192.168.1.10/24.

  2. The prefix becomes a 32-bit mask, and network, broadcast, subnet mask, wildcard and the usable host range fall out of it.

  3. Total addresses, usable host count and the historic address class are reported alongside.

CIDR math

/n means n leading 1 bits in the mask. Network is the address ANDed with the mask; broadcast is the network ORed with the inverted mask. Usable hosts are 2^(32−n) − 2 — one address goes to the network, one to the broadcast — except at /31 and /32, which reserve neither.

hosts = 2^(32 − n) − 2

Use cases

Home and office LANs

A /24 holds 256 addresses and 254 usable hosts, which is why it is the default on almost every consumer router. Split it into two /25s when one broadcast domain is too many machines.

Cloud VPC sizing

AWS accepts /16 through /28 for a VPC and reserves five addresses in every subnet rather than two, so a /28 leaves 11 usable and not 14. Size the block against the reservation, not the raw count.

VLAN planning

Carve a /24 into /27s at 30 hosts each or /28s at 14, and check where the boundaries land before the numbers go into a switch config.

Firewall and ACL rules

Equipment that wants a dotted mask takes 255.255.255.0 for a /24. Cisco ACLs want the inverse — the wildcard, 0.0.0.255 — and both are on screen at once here.

DHCP scope

Set the pool inside the usable host range, leaving the gateway and any static assignments room at one end so the scope cannot hand out an address something already holds.

Point-to-point links

A /31 carries two addresses and reserves no broadcast (RFC 3021). A /30 does the same job and spends two of its four addresses doing it.

Subnetting practice

Check CCNA-style answers — mask, network, broadcast and first and last host — for any prefix from /0 to /32.

Why a class is still shown

Classless routing replaced fixed class A/B/C boundaries in 1993 and RFC 4632 made CIDR the standard in 2006. Nothing routes on class any more, but the terms survive in documentation and exam questions, so the class of the first octet is reported as a label.

Questions

Does it handle IPv6?
No — IPv4 only. IPv6 is prefix arithmetic over 128 bits with no broadcast address and no usable-host subtraction, so it is a different instrument rather than a wider input on this one.
What do /31 and /32 mean?
A /31 is a two-address point-to-point link that reserves neither a network nor a broadcast address (RFC 3021). A /32 is a single host route. Both are exceptions to hosts = 2^(32−n) − 2, and the calculator applies them rather than reporting 0 and −1.
What is the wildcard mask for?
It is the bitwise complement of the subnet mask. Cisco ACLs and some routing-protocol statements take the wildcard instead of the mask: a /24 is mask 255.255.255.0 and wildcard 0.0.0.255.
Is anything sent to a server?
No. The whole calculation is a handful of bitwise operations and all of it runs in the page. Nothing is uploaded, logged or stored.
Why does the usable count differ from the total?
The network address and the broadcast address are part of the block but cannot be assigned to a host, so a /24 totals 256 addresses and offers 254. Some platforms reserve more — see the VPC note above.

One of 18 free tools here. They come out of building utility apps for macOS, iOS and the browser — all of it by one person.

See the apps
IP Subnet Calculator — CIDR, Mask, Wildcard, Hosts | Drish Labs