IPv4 Subnet Calculator (CIDR, mask, hosts)
Type an IPv4 address with optional CIDR (e.g., 192.168.1.10/24). Returns network address, broadcast, first/last usable host, total addresses, netmask, wildcard, IP class, public/private status, and binary representation.
- IP address
- 192.168.1.10
- Subnet mask
- 255.255.255.0 (/24)
- Wildcard mask
- 0.0.0.255
- Network address
- 192.168.1.0
- Broadcast
- 192.168.1.255
- First usable host
- 192.168.1.1
- Last usable host
- 192.168.1.254
- Total addresses
- 256
- IP class
- C
- RFC 1918 private
- ✓
11000000.10101000.00000001.00001010How it works
What CIDR notation means
CIDR (Classless Inter-Domain Routing) is the slash + number after an IP address — '192.168.1.10/24'. The number is how many bits at the start of the address belong to the network portion (vs the host portion). /24 means 24 bits of network = 8 bits of host = 256 total addresses, 254 usable.
Common CIDRs: /32 single host, /30 link (4 addresses, 2 usable), /29 small subnet (8/6), /24 LAN (256/254), /16 large network (65k), /8 ISP-scale block (16M). The smaller the CIDR number, the larger the network.
Network, broadcast, and usable hosts
Network address: the first address in the subnet, with host bits all zero. Used to identify the subnet itself; not assignable to a device.
Broadcast address: the last address, with host bits all one. Used to send a packet to every host in the subnet; not assignable.
Usable hosts: total addresses minus network and broadcast = 2^(32−CIDR) − 2. Exception: /31 (point-to-point links) and /32 (single host) treat all addresses as usable per RFC 3021.
Public vs private addresses
RFC 1918 reserves three address ranges for private internal networks: 10.0.0.0/8 (16M addresses), 172.16.0.0/12 (1M), 192.168.0.0/16 (65k). Most home and office routers use a slice of these (typically 192.168.1.0/24 or 192.168.0.0/24).
Public addresses are routable on the global internet and assigned by regional registries (ARIN, RIPE, APNIC, etc.). They cost money and are increasingly scarce — IPv4 exhaustion has driven CIDR adoption and IPv6 deployment.
The calculator detects whether an address falls in private ranges; useful for verifying network design or confirming that a leak isn't sending private addresses to the internet.
Frequently asked questions
›Why are usable hosts 2 less than total?
The first address (all host bits 0) is the network identifier and the last (all 1s) is the broadcast. Both are reserved and can't be assigned to a host.
›Why does /31 have 2 usable hosts instead of 0?
RFC 3021 allows /31 networks for point-to-point links (e.g., between routers). Both addresses are usable; broadcast and network reservations don't apply.
›What's the difference between netmask and wildcard?
Netmask has 1s in network bits, 0s in host bits (255.255.255.0). Wildcard is the inverse (0.0.0.255) — used in Cisco ACLs and OSPF area definitions.
›How do I subnet a network?
Take a parent network and split it into smaller blocks by adding bits to the CIDR. /24 → /25 splits into 2 subnets, /24 → /26 into 4, etc. Useful for separating departments or isolating IoT/guest networks.
›What's the smallest subnet I can have?
/32 — a single IP address. /31 is the smallest 'normal' subnet (2 addresses). /30 is common for router-to-router links (4/2 usable).
›Does this work for IPv6?
Not yet — only IPv4. IPv6 subnets are conceptually similar but use 128-bit addresses, hex notation, and different conventions. We may add IPv6 in a future version.
›What's the largest single subnet possible?
/0 covers all 4.3 billion IPv4 addresses — the entire IPv4 address space. /1 splits into two halves. /8 is 16M and was historically a single 'class A' block (e.g., 10.0.0.0/8).
›Does the data leave my browser?
No. Calculation runs locally; nothing is sent to a server.
Related tools
Last updated: