IP Subnet Calculator

IP Subnet Calculator

Calculate subnet masks, network addresses, broadcast addresses, and usable host ranges from CIDR notation. Essential for network planning, subnetting, and IP address management.

Last updated: March 2026 | By Patchworkr Team

Calculate Subnet

Format: IP address / prefix length (e.g., 10.0.0.0/8)

What is IP Subnetting?

IP subnetting is the process of dividing a network into smaller sub-networks (subnets). Each subnet has its own network address, broadcast address, and range of usable host IP addresses. This allows efficient use of IP address space and improves network organization and security.

CIDR (Classless Inter-Domain Routing) notation expresses IP addresses and their subnet masks compactly. For example, 192.168.1.0/24 means the IP address 192.168.1.0 with a 24-bit subnet mask (255.255.255.0). The /24 indicates that the first 24 bits identify the network, leaving 8 bits for host addresses (256 total, 254 usable).

Proper subnetting enables network administrators to create separate broadcast domains, implement security policies, optimize routing, and allocate IP addresses efficiently. A /24 network is perfect for a small office with up to 254 devices, while a /16 network can handle up to 65,534 devices.

How to Calculate Subnets

Understanding CIDR Notation

192.168.1.0/24
192.168.1.0: Base IP address
/24: Network prefix length (subnet mask bits)
Result: 256 total addresses (254 usable)

Common CIDR Blocks

/8
255.0.0.0
16,777,216 addresses
/16
255.255.0.0
65,536 addresses
/24
255.255.255.0
256 addresses
/25
255.255.255.128
128 addresses
/26
255.255.255.192
64 addresses
/27
255.255.255.224
32 addresses
/28
255.255.255.240
16 addresses
/30
255.255.255.252
4 addresses

Example Calculation

Calculate subnet information for 192.168.1.0/26:

Given:
IP = 192.168.1.0
Prefix = /26 (26 network bits, 6 host bits)
Step 1:
Calculate subnet mask from /26:
26 bits = 11111111.11111111.11111111.11000000
= 255.255.255.192
Step 2:
Calculate total addresses:
2^(32-26) = 2^6 = 64 total addresses
Step 3:
Determine addresses:
Network: 192.168.1.0
First Host: 192.168.1.1
Last Host: 192.168.1.62
Broadcast: 192.168.1.63
Result:
62 usable host addresses
Range: 192.168.1.1 through 192.168.1.62
(Network .0 and Broadcast .63 are reserved)

Frequently Asked Questions

What's the difference between total and usable hosts?

Total hosts includes all addresses in the subnet. Usable hosts excludes the network address (all host bits 0) and broadcast address (all host bits 1), which are reserved. A /24 has 256 total but only 254 usable addresses.

Can I use any IP as the network address?

No. The network address must have all host bits set to 0. For 192.168.1.0/24, valid network addresses are on 256-address boundaries: .0, 192.168.2.0, etc. 192.168.1.50/24 is invalid—the calculator shows what it should be.

What's a wildcard mask?

A wildcard mask is the inverse of a subnet mask, used in access control lists (ACLs) and routing protocols. Where the subnet mask has 1s, the wildcard has 0s. For mask 255.255.255.0, the wildcard is 0.0.0.255.

Why use /30 for point-to-point links?

/30 provides exactly 4 addresses: network, two usable hosts, and broadcast. Perfect for router-to-router links where you only need two IPs. /31 is even more efficient (no network/broadcast) but requires special router support (RFC 3021).

What are private IP ranges?

RFC 1918 defines private (non-routable) IP ranges: 10.0.0.0/8, 172.16.0.0/12, and 192.168.0.0/16. These are for internal networks only and not routed on the internet. Most home/office networks use 192.168.x.x.

How do I split a network into subnets?

Increase the prefix length. A /24 can split into two /25s, four /26s, eight /27s, etc. Each increase by 1 doubles the number of subnets while halving addresses per subnet. Use a subnet calculator to plan the division.

What's a /32 subnet?

/32 is a single IP address (host route). All 32 bits are network bits, leaving 0 host bits. Used in routing tables to specify a specific host rather than a network. There are no usable host addresses—it IS the host.

Can I have overlapping subnets?

No, not on the same network. Overlapping subnets cause routing confusion. For example, 192.168.1.0/24 and 192.168.1.128/25 overlap—the /25 is contained within the /24. Use proper planning to avoid conflicts.

Related Tools