Subnet Calculator
Calculate network address, broadcast, usable hosts, and subnet mask from any IP and CIDR.
This tool is for informational and educational purposes only. It is not a substitute for professional financial, medical, legal, or engineering advice. See Terms of Service.
Can't find what you need?
Request a ToolHow to Use the Subnet Calculator
This calculator takes an IP address and CIDR prefix length and computes the full subnet details, including network address, broadcast address, usable host range, and subnet mask in multiple formats. It is useful for network engineers, system administrators, and anyone studying for networking certifications.
- Enter an IP address. Type any valid IPv4 address in dotted decimal notation (for example, 192.168.1.0 or 10.0.0.1). The address does not need to be the network address; the calculator will determine it for you.
- Enter the CIDR prefix. This is a number from 0 to 32 that defines the subnet size. Common values include /24 (256 addresses), /16 (65,536 addresses), and /8 (16.7 million addresses).
- Read the results. The primary result shows the network in CIDR notation. The breakdown includes the network address, broadcast address, subnet mask, wildcard mask, total hosts, usable hosts, first and last usable addresses, IP class, and the binary subnet mask.
Use the Share button to send your subnet calculation to a colleague, or Copy to paste the result into documentation or a network diagram.
About Subnet Calculation
Subnetting divides a larger IP network into smaller, more manageable segments. Each subnet has a network address (the first address, identifying the subnet itself), a broadcast address (the last address, used to send packets to all hosts), and a range of usable host addresses in between. The CIDR prefix length determines how many bits are used for the network portion versus the host portion.
Understanding subnetting is essential for designing efficient networks, configuring routers and firewalls, and passing networking exams like CCNA. The wildcard mask (the inverse of the subnet mask) is commonly used in access control lists on Cisco routers.
Frequently Asked Questions
What is CIDR notation?
CIDR (Classless Inter-Domain Routing) notation writes an IP address followed by a slash and a prefix length, such as 192.168.1.0/24. The prefix length indicates how many leading bits of the address identify the network. A /24 means the first 24 bits are the network portion, leaving 8 bits (256 addresses) for hosts.
How do you calculate a subnet mask?
The subnet mask is a 32-bit number where the first N bits are 1 and the remaining bits are 0, where N is the CIDR prefix length. For a /24 prefix, the binary mask is 11111111.11111111.11111111.00000000, which converts to 255.255.255.0 in dotted decimal. The mask is applied to an IP address using a bitwise AND operation to find the network address.
What is a wildcard mask?
A wildcard mask is the inverse (bitwise NOT) of the subnet mask. Where the subnet mask has a 1, the wildcard mask has a 0, and vice versa. For a /24 network, the subnet mask is 255.255.255.0 and the wildcard mask is 0.0.0.255. Wildcard masks are used in Cisco access control lists and OSPF area configurations to specify which address bits to match.
How many hosts are in a /24 network?
A /24 network has 256 total addresses (2 to the power of 8). Of those, 254 are usable for hosts. The first address is the network address and the last address is the broadcast address, both reserved and not assignable to devices. For any prefix length, the formula is: usable hosts = 2^(32 - prefix) - 2.