🖧 IP Subnet Calculator
Enter an IP address (as four octets) and the number of subnets you need to plan your IPv4 subnetting layout.
What this calculator does
Subnetting divides one larger IP network into several smaller networks (subnets), which is common when segmenting a network by department, location, or device type. This calculator figures out how many bits need to be borrowed from the host portion of the address to create the number of subnets you need.
How it works
Enter your IP address as four octets and your base prefix length. Starting from that base prefix, the calculator finds the smallest number of additional bits needed so that 2 raised to that number of bits is at least as large as the number of subnets you requested. Adding those bits to the base prefix gives the new prefix length and subnet mask. The remaining bits are host bits, and 2 raised to the number of host bits, minus 2 for the network and broadcast addresses, gives the usable hosts per subnet.
This tool is for general network planning and educational reference; always confirm your addressing plan against your organization’s actual routing and device requirements.