Ipcidrsubnet Calculator
Our subnetting & ip tool computes ipcidrsubnet accurately. Enter your inputs for detailed analysis and optimization tips.
Reviewed for accuracy by Daniel Agrici, Founder & Lead Developer
Ipcidrsubnet Calculator
Calculator
Adjust values & calculateEnter your values below. Every result is computed in your browser โ no data is sent to any server.
Formula: Usable Hosts = 2^(32-CIDR) - 2 | Network = IP AND Mask | Broadcast = Network OR Wildcard
Worked example โ Network: 192.168.1.0/24 | 254 usable hosts | Class C Private
Formula
Usable Hosts = 2^(32-CIDR) - 2 | Network = IP AND Mask | Broadcast = Network OR Wildcard
The subnet mask is derived from the CIDR prefix length. Network address is the bitwise AND of the IP and mask. Broadcast address is the network address OR-ed with the wildcard mask (inverse of subnet mask). Usable hosts exclude the network and broadcast addresses.
Worked Examples
Example 1: Standard Office Network (/24)
Problem:Calculate subnet details for the network 192.168.1.0/24.
Solution:Subnet Mask: 255.255.255.0 Network Address: 192.168.1.0 Broadcast Address: 192.168.1.255 First Usable Host: 192.168.1.1 Last Usable Host: 192.168.1.254 Total Addresses: 256 Usable Hosts: 254
Result:Network: 192.168.1.0/24 | 254 usable hosts | Class C Private
Example 2: Small Department Subnet (/28)
Problem:A department needs 10 devices. Calculate subnet details for 10.0.1.0/28.
Solution:Subnet Mask: 255.255.255.240 Network Address: 10.0.1.0 Broadcast Address: 10.0.1.15 First Host: 10.0.1.1 Last Host: 10.0.1.14 Total Addresses: 16 Usable Hosts: 14 /28 provides 14 usable hosts, sufficient for 10 devices with room for 4 more.
Result:Network: 10.0.1.0/28 | 14 usable hosts | Class A Private
Frequently Asked Questions
What is CIDR notation and how does it relate to subnet masks?
CIDR (Classless Inter-Domain Routing) notation is a compact method for specifying IP addresses and their associated network prefixes. 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 indicates how many bits of the 32-bit IP address represent the network portion. A /24 means the first 24 bits are the network portion and the remaining 8 bits are for host addresses. This directly corresponds to a subnet mask: /24 equals 255.255.255.0, /16 equals 255.255.0.0, and /8 equals 255.0.0.0. CIDR replaced the older classful addressing system (Class A, B, C) and allows for more flexible allocation of IP address space, reducing waste and enabling route aggregation in Internet routing tables.
How do you calculate the number of usable hosts in a subnet?
The number of usable host addresses in a subnet is calculated by the formula 2 raised to the power of the host bits minus 2. The host bits equal 32 minus the CIDR prefix length. Two addresses are subtracted because the first address in any subnet is reserved as the network address (all host bits set to 0) and the last address is reserved as the broadcast address (all host bits set to 1). For example, a /24 subnet has 32 minus 24 equals 8 host bits, yielding 2 to the 8th power minus 2 equals 254 usable host addresses. A /28 subnet has 4 host bits giving 2 to the 4th minus 2 equals 14 usable hosts. The special cases are /31 (point-to-point links, 2 addresses per RFC 3021) and /32 (single host address).
What is the difference between network address, broadcast address, and host addresses?
In any IP subnet, three types of addresses serve distinct purposes. The network address is the first address in the subnet where all host bits are zero, identifying the subnet itself and used in routing tables. It cannot be assigned to any device. The broadcast address is the last address where all host bits are one, used to send data to all hosts within the subnet simultaneously. It also cannot be assigned to individual devices. Host addresses are all addresses between the network and broadcast addresses that can be assigned to individual devices such as computers, printers, servers, and routers. For the subnet 192.168.1.0/24, the network address is 192.168.1.0, the broadcast is 192.168.1.255, and usable hosts range from 192.168.1.1 through 192.168.1.254 giving 254 assignable addresses.
How do I determine the right subnet size for my network?
Choosing the correct subnet size requires counting the number of devices that need IP addresses and then selecting the smallest subnet that accommodates them with room for growth. Start by counting all devices including computers, phones, printers, servers, IoT devices, and network infrastructure like switches and access points. Add 20 to 50 percent for future growth. Then find the smallest power of 2 that exceeds your total device count plus 2 (for network and broadcast addresses). For 50 devices, you need at least 52 addresses, so a /26 subnet providing 62 usable hosts is appropriate. For 200 devices, a /24 with 254 hosts works well. Over-sizing wastes address space especially with public IPs, while under-sizing requires painful renumbering later. It is generally better to slightly oversize than to undersize.
What are private IP address ranges and when should they be used?
Private IP address ranges are blocks of addresses reserved by RFC 1918 for use within private networks that do not need to be globally unique on the Internet. The three private ranges are: 10.0.0.0 to 10.255.255.255 (10.0.0.0/8) providing over 16 million addresses, 172.16.0.0 to 172.31.255.255 (172.16.0.0/12) providing about 1 million addresses, and 192.168.0.0 to 192.168.255.255 (192.168.0.0/16) providing about 65,000 addresses. Private addresses should be used for all internal network devices that do not require direct Internet accessibility. Devices using private addresses connect to the Internet through Network Address Translation (NAT) on a router or firewall. This conserves the limited supply of public IPv4 addresses and adds a layer of security by hiding internal network structure from the outside world.
References
Background & Theory
History
Reviewed for accuracy by Daniel Agrici, Founder & Lead Developer ยท Editorial policy
Related Calculators
๐งฎBandwidth Time Transfer Calculator
Calculate bandwidth time transfer with inputs, formulas, and instant results.
๐งฎDownload Time Calculator
Calculate download time with inputs, formulas, and instant results.
๐งฎThroughput Efficiency Calculator
Calculate throughput efficiency with inputs, formulas, and instant results.
๐งฎBase64encode Decode Calculator
Calculate base64encode decode with inputs, formulas, and instant results.
๐งฎHash Checksum Calculator
Calculate hash checksum with inputs, formulas, and instant results.
๐งฎUrlpercent Encoding Calculator
Calculate urlpercent encoding with inputs, formulas, and instant results.