How do I calculate a subnet from an IP address and CIDR?
Enter an IPv4 address and a CIDR prefix (0 to 32) and the calculator works out the whole subnet instantly. For example, 192.168.1.10 with prefix /24 gives network 192.168.1.0, broadcast 192.168.1.255, subnet mask 255.255.255.0, and 254 usable hosts from 192.168.1.1 to 192.168.1.254. The sample uses 10.0.5.23/26: network 10.0.5.0, broadcast 10.0.5.63, mask 255.255.255.192, wildcard 0.0.0.63, and 62 usable hosts. Quick prefix buttons jump to common sizes (/8, /16, /20, /24, /25, /26, /28, /30), and the binary view shows the IP, mask and network in binary so you can see exactly where the network bits end and the host bits begin.
What do network, broadcast, mask and wildcard mean?
The network address is the first address in the subnet and identifies the subnet itself; it cannot be assigned to a device. The broadcast address is the last address, used to reach every host in the subnet at once, and also cannot be assigned. The subnet mask marks which bits of the address are the network part (1 bits) and which are the host part (0 bits): a /24 mask is 255.255.255.0, meaning the first 24 bits are network. The wildcard mask is the inverse of the subnet mask (0.0.0.255 for a /24) and is used in router access lists and OSPF configuration. Usable hosts are everything between network and broadcast, which is why a /24 with 256 total addresses gives 254 usable hosts.
How many hosts does each CIDR prefix give?
The count follows one formula: usable hosts=2^(32 - CIDR) - 2, subtracting the network and broadcast addresses. Common sizes: /8 gives 16,777,214 usable hosts, /16 gives 65,534, /20 gives 4,094, /24 gives 254, /25 gives 126, /26 gives 62, /27 gives 30, /28 gives 14, /29 gives 6, and /30 gives 2, which is why /30 is the classic point-to-point link size. A /31 has no usable hosts by the classic formula (though point-to-point links sometimes use both addresses), and /32 is a single host route. When planning a network, pick the smallest prefix that fits your device count with room to grow: 50 devices fit a /26 (62 hosts), while 200 devices need a /24.
How is the network address calculated?
By a bitwise AND of the IP address and the subnet mask. In binary, 192.168.1.10 is 11000000.10101000.00000001.00001010 and the /24 mask is twenty-four 1 bits followed by eight 0 bits; AND keeps the first 24 bits and zeroes the rest, giving 192.168.1.0. The broadcast address sets all host bits to 1 instead, giving 192.168.1.255. The binary view in this calculator shows the IP, mask and network side by side so you can follow the operation bit by bit, which is exactly how subnetting is taught for certifications like CCNA and Network+. Two addresses are in the same subnet when they produce the same network address under the same mask.
What are private IP ranges and IP classes?
Private addresses, used inside homes and companies, are 10.0.0.0/8, 172.16.0.0/12 (172.16.0.0 to 172.31.255.255) and 192.168.0.0/16. Your home router almost certainly uses 192.168.1.0/24 or similar. The old class system (still shown by this calculator) divided addresses by first octet: class A 0-127, class B 128-191, class C 192-223, class D 224-239 for multicast, and class E 240-255 reserved. Modern networking uses CIDR instead of classes, because CIDR allows any prefix length, but classes still appear in textbooks and legacy systems. Subnetting private ranges is how a company splits one /16 into department-sized /24 or /26 networks.
Is it free and private?
Yes. The IP subnet calculator is free, with no signup, no account and no limits. The calculation runs entirely in your browser, so the addresses you enter are never sent to a server, stored or logged, and they disappear when you clear the fields or close the tab. That matters when you are working with internal network plans. For network engineers, students, sysadmins and home-lab builders who need a subnet worked out quickly, with masks, host ranges and binary all in one view, this page does the job in seconds.