What information does a subnet calculation give you?

OutputExample (/24 network)Description
Network address192.168.1.0First address — identifies the network (not assignable to hosts)
Subnet mask255.255.255.0Binary mask defining network vs host portions
Broadcast address192.168.1.255Last address — sends to all hosts (not assignable)
First usable host192.168.1.1First IP address assignable to a device
Last usable host192.168.1.254Last IP address assignable to a device
Number of usable hosts2542⁸ − 2 = 256 − 2 (network + broadcast)

CIDR prefix length reference table

CIDRSubnet MaskTotal AddressesUsable HostsUse Case
/8255.0.0.016,777,21616,777,214Large enterprise / ISP
/16255.255.0.065,53665,534Large LAN
/24255.255.255.0256254Standard office network
/25255.255.255.128128126Small department
/26255.255.255.1926462Small team
/27255.255.255.2243230Small subnet
/28255.255.255.2401614Very small subnet
/30255.255.255.25242Point-to-point links
/32255.255.255.25510Single host (loopback, static route)

Private IP address ranges (RFC 1918)

These ranges are reserved for private networks and are not routable on the public internet: 10.0.0.0/8 (10.0.0.0–10.255.255.255 — large networks), 172.16.0.0/12 (172.16.0.0–172.31.255.255 — medium networks), 192.168.0.0/16 (192.168.0.0–192.168.255.255 — home and small office networks). All home routers use the 192.168.x.x range. See also: the Hex to Decimal Converter and the Password Generator.

Frequently asked questions

What is a subnet mask?

A subnet mask is a 32-bit number that defines which portion of an IP address identifies the network and which identifies the host. 255.255.255.0 in binary: 24 ones followed by 8 zeros — meaning the first 24 bits are the network (/24 in CIDR), and the last 8 bits identify up to 254 hosts.

What is CIDR notation?

CIDR (Classless Inter-Domain Routing) notation expresses an IP address and its prefix length together: 192.168.1.0/24. The /24 means 24 bits are the network portion. Equivalent to subnet mask 255.255.255.0. CIDR replaced the old Class A/B/C system and allows more flexible network sizing.

How many usable hosts does a /24 subnet have?

A /24 subnet has 256 total addresses (2⁸). Subtract 2: the network address (first) and broadcast address (last). Result: 254 usable host addresses. Formula: Usable hosts = 2^(32−prefix) − 2. /25 = 126. /26 = 62. /27 = 30. /28 = 14. /30 = 2 (used for point-to-point router links).

How do you find the broadcast address of a subnet?

Set all host bits to 1. For 192.168.1.0/24: the last 8 bits are host bits. All 1s in 8 bits = 255. Broadcast = 192.168.1.255. For 10.0.0.0/8: last 24 bits are host bits. Broadcast = 10.255.255.255.

What is the difference between a router and a switch in subnets?

A switch connects devices within the same subnet — it uses MAC addresses and does not modify the IP header. A router connects different subnets and the internet — it uses IP addresses to route packets between networks. A default gateway is the router's IP address that hosts send traffic to when the destination is in a different subnet.

Sources & References

Sources: RFC 1918 — Address Allocation for Private Internets (IETF); RFC 4632 — CIDR notation; IANA — IPv4 Special-Purpose Address Registry; Cisco Networking Academy — Subnetting fundamentals.

How to subnet a /24 network into smaller subnets

A common task: divide a 192.168.1.0/24 network into 4 equal subnets. Each subnet gets /26 (64 addresses, 62 usable):

SubnetNetwork AddressUsable RangeBroadcast
Subnet 1192.168.1.0/26192.168.1.1 – .62192.168.1.63
Subnet 2192.168.1.64/26192.168.1.65 – .126192.168.1.127
Subnet 3192.168.1.128/26192.168.1.129 – .190192.168.1.191
Subnet 4192.168.1.192/26192.168.1.193 – .254192.168.1.255

Formula: to split a /n into X equal subnets, you need log₂(X) additional bits. Splitting /24 into 4 subnets: log₂(4) = 2 extra bits → /24+2 = /26. Into 8 subnets: log₂(8) = 3 → /27.

Wildcard masks vs subnet masks

Wildcard masks are the inverse of subnet masks, used in Cisco ACLs (Access Control Lists) and OSPF routing. Wildcard = 255.255.255.255 − Subnet mask.

CIDRSubnet MaskWildcard MaskUse Case
/24255.255.255.00.0.0.255Match any host in /24 network
/25255.255.255.1280.0.0.127Match half of /24
/32255.255.255.2550.0.0.0Match exact single host
/00.0.0.0255.255.255.255Match all addresses (any/any)

Example ACL: permit ip 192.168.1.0 0.0.0.255 — permits all hosts in the 192.168.1.0/24 network.

IPv6 subnetting basics

IPv6 uses 128-bit addresses (vs 32-bit IPv4). Standard allocation: ISPs assign /48 to businesses, /56 to home users, /64 to individual network segments. A /64 prefix provides 2⁶⁴ = ~18.4 quintillion host addresses per subnet — enough that subnetting within a /64 is rarely needed. IPv6 CIDR notation works identically to IPv4: 2001:db8::/32 is a /32 prefix. The subnet calculator handles IPv4; for IPv6 subnetting use a dedicated IPv6 tool.

Sources: RFC 1918 (private addresses); RFC 4632 (CIDR); RFC 4291 (IPv6 addressing); Cisco Networking Academy subnetting curriculum.

Common subnetting mistakes and how to avoid them

MistakeExample ErrorFix
Assigning the network address to a hostGiving 192.168.1.0 to a deviceFirst usable host is network+1: 192.168.1.1
Assigning the broadcast address to a hostGiving 192.168.1.255 to a deviceLast usable host is broadcast−1: 192.168.1.254
Subnet mask doesn't match CIDR prefix/24 configured but mask set to 255.255.0.0 (/16)Always verify CIDR and mask match
Forgetting to increment network address between subnetsTwo subnets both starting at .0Second subnet starts at first subnet's broadcast+1
Using /31 and expecting 2 hosts/31 = 2 addresses but 0 usable (traditional)RFC 3021 allows /31 for point-to-point — but verify device support first

Private IP ranges and when to use each

RFC 1918 defines three private IPv4 ranges — none are routable on the public internet without NAT. Choosing which range to use: 10.0.0.0/8 (10.x.x.x): largest range, 16.7 million addresses — use for large enterprise networks, data centres, VPNs. 172.16.0.0/12 (172.16–31.x.x): 1 million addresses — use for medium networks; less common. 192.168.0.0/16 (192.168.x.x): 65,534 addresses per /24 subnet — default for all home routers and small offices. APIPA: 169.254.x.x — assigned automatically when DHCP fails; always indicates a network problem. 127.0.0.1: loopback address (localhost) — represents the device itself. Related: Password Generator · hex converter for network access credentials.

VLSM: Variable Length Subnet Masking explained

Fixed-size subnetting wastes IP addresses when different network segments have different size requirements. VLSM allocates each subnet only as many addresses as it needs. Example: you have 192.168.1.0/24 (256 addresses) and need 3 subnets: one for 100 hosts, one for 50 hosts, one for 20 hosts.

DepartmentHosts NeededSubnetAddressesWaste
Engineering100192.168.1.0/25126 usable26 addresses
Sales50192.168.1.128/2662 usable12 addresses
Management20192.168.1.192/2730 usable10 addresses
Remaining192.168.1.224/2730 usableAvailable for future use

Without VLSM, you would need three /25 subnets (using all 256 addresses with no room to grow). VLSM leaves an entire /27 available for future expansion.

Point-to-point links: why /30 is the standard

A /30 subnet has 4 addresses: 1 network address, 2 usable host addresses, 1 broadcast address. This is perfect for a link between two routers, where only 2 devices need IPs. Using a /24 for a router-to-router link would waste 252 usable addresses. Common point-to-point /30 block: 10.0.0.0/30 — Router A gets 10.0.0.1, Router B gets 10.0.0.2, network is 10.0.0.0, broadcast is 10.0.0.3.

Wildcard masks: the inverse of subnet masks

Wildcard masks are used in Cisco ACLs (Access Control Lists) and OSPF configuration — they are the bitwise inverse of a subnet mask. Convert: subtract each octet of the subnet mask from 255.

Subnet MaskWildcard MaskMatches
255.255.255.0 (/24)0.0.0.255Any host in the /24 network
255.255.255.252 (/30)0.0.0.34 addresses in the /30 subnet
255.255.0.0 (/16)0.0.255.255Any host in the /16 network
255.255.255.255 (/32)0.0.0.0Exact host match only
0.0.0.0 (any)255.255.255.255All hosts (permit/deny any)

Common subnetting mistakes to avoid

Sources: Cisco IOS Subnet Masking Guide; RFC 950 (Subnetting); RFC 3021 (/31 point-to-point links).

Related calculators

Formula reviewed by Mayra · Methodology · Last reviewed: June 2026