UK Calculator Editorial · Calculator verified ·

Last updated: March 2026

IP Subnet Calculator

Enter an IPv4 address and select a CIDR prefix to calculate network range, broadcast address, usable hosts and more.

Enter a valid IPv4 address (e.g. 10.0.0.0)

CIDR Quick Reference Table

Common subnet sizes at a glance — click any row to load it into the calculator.

CIDR Subnet Mask Total Hosts Usable Hosts Common Use
/30255.255.255.25242P2P links
/29255.255.255.24886Small office
/28255.255.255.2401614
/27255.255.255.2243230
/26255.255.255.1926462
/25255.255.255.128128126
/24255.255.255.0256254Small LAN
/23255.255.254.0512510
/22255.255.252.01,0241,022
/20255.255.240.04,0964,094
/16255.255.0.065,53665,534Large enterprise
/8255.0.0.016,777,21616,777,214ISP level

Click any row to populate the calculator above.

What is IP Subnetting?

IP subnetting is the process of dividing a single large IP network into smaller, more manageable logical subnetworks — called subnets. Each subnet operates as its own distinct network segment, with its own range of assignable IP addresses, network address, and broadcast address.

CIDR (Classless Inter-Domain Routing) notation is the modern standard for expressing IP address blocks. Written as an IP address followed by a forward slash and a number — for example 192.168.1.0/24 — the number after the slash (called the prefix length) indicates how many of the 32 bits in an IPv4 address are used to identify the network. The remaining bits identify individual hosts within that network.

A /24 prefix means 24 bits are used for the network portion, leaving 8 bits for host addressing. This gives 28 = 256 total addresses, of which 254 are usable (two are reserved: the network address and broadcast address).

Why Subnetting Matters

  • Network performance: Smaller broadcast domains reduce unnecessary traffic. Broadcast packets only reach devices within the same subnet, preventing traffic storms on large flat networks.
  • Security: Subnets create logical boundaries between departments or systems. A compromised device in one subnet cannot directly reach devices in another without passing through a router or firewall.
  • IP conservation: By allocating only the address space needed for each segment, organisations avoid wasting IP addresses. A /30 subnet for a point-to-point link uses just 4 addresses instead of a full /24 block.
  • Simplified management: Network administrators can apply routing policies, access control lists, and QoS rules at the subnet level.

How to Calculate Subnet Ranges

Understanding how to manually calculate subnet ranges is valuable for network engineers and anyone studying for CCNA or CompTIA Network+ certifications.

Step-by-Step: Binary Conversion Method

  1. Write the IP address in binary. Convert each octet separately. For 192.168.1.0: 11000000.10101000.00000001.00000000
  2. Write the subnet mask in binary. For /24: 11111111.11111111.11111111.00000000
  3. Perform a bitwise AND of the IP address and mask to get the network address. The host bits (0s in mask) become 0.
  4. Set all host bits to 1 to find the broadcast address.
  5. First usable host = network address + 1. Last usable host = broadcast address - 1.

Worked Example: 192.168.1.0/24

  • IP in binary: 11000000.10101000.00000001.00000000
  • Mask (/24): 11111111.11111111.11111111.00000000
  • Network Address: 192.168.1.0 (all host bits = 0)
  • Broadcast Address: 192.168.1.255 (all host bits = 1)
  • First Usable Host: 192.168.1.1
  • Last Usable Host: 192.168.1.254
  • Usable Hosts: 28 − 2 = 254
  • Wildcard Mask: 0.0.0.255 (inverse of subnet mask)

Private vs Public IP Ranges

RFC 1918 defines three IP address ranges reserved for private use — these addresses are not routable on the public internet and are used exclusively for internal networks. All internet access from private addresses requires Network Address Translation (NAT).

IP Range CIDR Block Total Addresses Typical Use
10.0.0.0 – 10.255.255.25510.0.0.0/816,777,216Large enterprise, data centres
172.16.0.0 – 172.31.255.255172.16.0.0/121,048,576Medium networks, VPNs
192.168.0.0 – 192.168.255.255192.168.0.0/1665,536Home networks, small offices

Additionally, 169.254.0.0/16 is reserved for APIPA (Automatic Private IP Addressing) — devices self-assign an address from this range when DHCP fails. 127.0.0.0/8 is the loopback range (commonly 127.0.0.1, or "localhost").

Common Network Design Examples

Here are practical examples of how network engineers select subnet sizes for different scenarios:

  • Home router (192.168.1.0/24): A standard home network uses /24, providing 254 addresses — more than enough for all household devices. The router typically assigns itself .1 and distributes .100–.254 via DHCP.
  • Office with multiple departments: A medium office might allocate 10.0.1.0/24 for HR, 10.0.2.0/24 for IT, and 10.0.3.0/24 for Finance — keeping each department in a separate broadcast domain for security and performance.
  • Data centre server farm: A /22 block (10.10.0.0/22) provides 1,022 usable addresses for a rack of servers, with room to grow.
  • WAN point-to-point links: A /30 subnet is used between two router interfaces on a leased line — providing exactly 2 usable addresses, one for each router endpoint, with no wasted addresses.
  • VLAN segmentation: A large enterprise might use /8 or /12 as the overall address space, then subnet into /24 VLANs for each floor of a building.

IPv4 vs IPv6 Subnetting Differences

While this calculator focuses on IPv4, understanding the differences with IPv6 is increasingly important for modern network engineers:

  • Address length: IPv4 uses 32-bit addresses (about 4.3 billion total). IPv6 uses 128-bit addresses — creating approximately 3.4 × 1038 unique addresses.
  • CIDR still applies: IPv6 also uses prefix length notation (e.g., 2001:db8::/32). A /48 is typically assigned to an organisation, /64 to individual LAN segments.
  • No broadcast: IPv6 eliminates broadcast entirely, replacing it with multicast and anycast addresses. This removes the need to subtract 2 from host counts — every address in an IPv6 /64 except the subnet-router anycast is assignable.
  • No NAT required: With sufficient address space, every device can have a globally routable IPv6 address, making end-to-end connectivity simpler.
  • Subnetting granularity: Standard practice is to subnet IPv6 at /64 boundaries. Sub-/64 subnetting is technically possible but breaks SLAAC (Stateless Address Autoconfiguration).

Frequently Asked Questions

CIDR (Classless Inter-Domain Routing) notation is a compact way to express an IP address and its associated network mask. Written as an IP address followed by a slash and a number (e.g., 192.168.1.0/24), the number after the slash indicates how many bits in the 32-bit address are used for the network portion. /24 means the first 24 bits identify the network, leaving 8 bits for host addresses — giving 256 total addresses and 254 usable hosts.

The formula is: Usable Hosts = 2^(32 - prefix length) - 2. For a /24 subnet: 2^(32-24) - 2 = 256 - 2 = 254 usable hosts. The two addresses subtracted are the network address (all host bits = 0) and the broadcast address (all host bits = 1). For /30: 2^2 - 2 = 2 usable hosts. For /16: 2^16 - 2 = 65,534 usable hosts.

The network address is the first address in a subnet (all host bits = 0) — it identifies the subnet itself and cannot be assigned to a device. The broadcast address is the last address (all host bits = 1) — used to reach all devices on the subnet, also not assignable. For 192.168.1.0/24: network = 192.168.1.0, broadcast = 192.168.1.255, usable range = 192.168.1.1 to 192.168.1.254.

RFC 1918 defines three private ranges: 10.0.0.0/8 (10.0.0.0 – 10.255.255.255) for large enterprises; 172.16.0.0/12 (172.16.0.0 – 172.31.255.255) for medium networks; 192.168.0.0/16 (192.168.0.0 – 192.168.255.255) for home/small office. These addresses are not routable on the public internet and require NAT for internet access.

A wildcard mask is the binary inverse of a subnet mask. Where the subnet mask has 1s (network bits), the wildcard has 0s, and vice versa. A /24 subnet mask of 255.255.255.0 has wildcard mask 0.0.0.255. Wildcard masks are used in ACLs on routers and firewalls, and in OSPF configurations, to specify address matching rules. A 0 bit means the address bit must match; a 1 bit means it can be anything.

For most small offices, a /24 subnet (255.255.255.0) is standard, providing 254 usable addresses. For departmental segmentation, /26 (62 hosts) or /27 (30 hosts) work well. For WAN point-to-point router links, use /30 (2 usable hosts). The 192.168.1.0/24 range is most common for small offices. Always ensure your DHCP scope fits within the usable host range.

Expert Reviewed — This calculator is reviewed by our team of network engineering specialists. Subnet calculations verified against RFC 950 and RFC 1518. Last verified: March 2026.

RFC 1918 Compliant
Secure & Private
190+ Calculators
Always Free
UK

UK Calculator Editorial Team

Our calculators are maintained by qualified network engineers and technical specialists. All tools use verified RFC standards. Learn more about our team.

Last updated: March 2026 | Verified with RFC 1918 and current networking standards

Frequently Asked Questions

What is a subnet mask?
A subnet mask is a 32-bit number that divides an IP address into two parts: the network portion and the host portion. It is written in dotted decimal notation, such as 255.255.255.0. Each 255 represents 8 bits set to 1, indicating the network part, while 0 represents 8 bits set to 0, indicating the host part. The subnet mask tells routers and devices which part of an IP address identifies the network and which part identifies the specific device. For example, with a subnet mask of 255.255.255.0 and IP address 192.168.1.50, the network is 192.168.1.0 and the host ID is 50.
How do I calculate subnets?
To calculate subnets, you need to determine how many subnets or hosts you require, then choose the appropriate prefix length. Start with your network address and prefix, for example 10.0.0.0/8. If you need 4 subnets, borrow 2 bits from the host portion (because 2 to the power of 2 equals 4), changing the prefix to /10. Each subnet contains 2 to the power of 22 minus 2 usable hosts (4,194,302 hosts). The subnets are 10.0.0.0/10, 10.64.0.0/10, 10.128.0.0/10 and 10.192.0.0/10. For practical office networks, a /24 is standard, and you can subdivide it into smaller blocks like /25, /26 or /27 as needed.
What is CIDR notation?
CIDR (Classless Inter-Domain Routing) notation is a compact method of expressing an IP address together with its subnet mask. It is written as the IP address followed by a forward slash and a number, for example 192.168.1.0/24. The number after the slash indicates how many of the 32 bits in the IPv4 address are used for the network portion. A /24 means the first 24 bits are the network part, leaving 8 bits for hosts, which gives 254 usable addresses. CIDR replaced the older classful addressing system (Class A, B, C) in 1993, allowing much more flexible allocation of IP address space and reducing waste in global routing tables.
What is the difference between /24 and /16?
The difference between /24 and /16 lies in the size of the network. A /24 network uses 24 bits for the network portion and 8 bits for hosts, providing 254 usable IP addresses with a subnet mask of 255.255.255.0. A /16 network uses 16 bits for the network and 16 bits for hosts, providing 65,534 usable addresses with a subnet mask of 255.255.0.0. A /16 is 256 times larger than a /24. In practice, /24 is typical for a single office LAN or VLAN, while /16 is used for larger enterprise networks that need thousands of addresses across multiple subnets.
How many hosts in a /24 network?
A /24 network has 254 usable host addresses. The total number of addresses is 2 to the power of 8 (since 32 minus 24 equals 8 host bits), which gives 256 addresses. However, two addresses are reserved: the network address (the first address, with all host bits set to 0) and the broadcast address (the last address, with all host bits set to 1). For 192.168.1.0/24, the network address is 192.168.1.0, the broadcast is 192.168.1.255, and the usable range is 192.168.1.1 through 192.168.1.254. A /24 is the most commonly used subnet size for small to medium office networks.
What is a wildcard mask?
A wildcard mask is the binary inverse (or bitwise complement) of a subnet mask. Where the subnet mask has 1 bits, the wildcard mask has 0 bits, and vice versa. For a /24 subnet mask of 255.255.255.0, the wildcard mask is 0.0.0.255. Wildcard masks are primarily used in Cisco router access control lists (ACLs) and OSPF routing configurations to specify which bits of an address must match a given rule. A 0 bit in the wildcard means the corresponding address bit must match exactly, while a 1 bit means it can be anything. To convert a subnet mask to a wildcard mask, subtract each octet from 255.
What is the broadcast address?
The broadcast address is the last address in a subnet, formed by setting all host bits to 1. It is used to send a packet to every device on the subnet simultaneously. For the network 192.168.1.0/24, the broadcast address is 192.168.1.255. For 10.0.0.0/8, the broadcast is 10.255.255.255. The broadcast address cannot be assigned to any individual device. Common uses include ARP requests (finding a device's MAC address), DHCP discovery (finding a DHCP server on the network) and certain network management protocols. Understanding the broadcast address is essential for network troubleshooting and correct firewall rule configuration.
How do I split a network into subnets?
To split a network into smaller subnets, you borrow bits from the host portion of the address and add them to the network portion, increasing the prefix length. For example, to split 192.168.1.0/24 into 4 equal subnets, borrow 2 bits (2 to the power of 2 equals 4), making each subnet a /26 with 62 usable hosts. The four subnets would be 192.168.1.0/26, 192.168.1.64/26, 192.168.1.128/26 and 192.168.1.192/26. When planning subnets, consider future growth, DHCP scope requirements and VLAN segmentation. Use Variable Length Subnet Masking (VLSM) if different subnets need different sizes.

Official Sources

Data verified against official UK government sources. Last checked April 2026.