IP Subnet Calculator
Calculate the network, broadcast, host range, netmask and wildcard of any IPv4 or IPv6 CIDR block, then split it into equal subnets or a VLSM plan.
Examples:
Results
Binary view (network bits | host bits)
Subnetting
How to use the subnet calculator
- Type an address with its prefix in IP address with prefix or mask:
192.168.1.10/24,10.0.0.1 255.255.0.0,172.16.5.4/255.255.240.0or2001:db8::1/48. A wildcard mask such as0.0.0.255is recognised too. Without a prefix, /24 (IPv4) or /64 (IPv6) is assumed and the tool says so. - Press Enter or click Calculate, or try one of the Examples:.
- Read the Results, and click Copy to copy them all as text.
- Under Subnetting, choose a Method, fill in Number of subnets or Hosts needed per subnet, and click Split.
What the results mean (IPv4)
- Network address: the first address of the block, with all host bits at 0. It identifies the subnet.
- Broadcast address: the last address, with all host bits at 1. Packets sent to it reach every host of the subnet.
- First usable host and Last usable host: the range you can assign to devices. Usable hosts is 2^(32 − prefix) − 2, because the network and broadcast addresses are reserved. A /31 is the exception: on point-to-point links both addresses are usable (RFC 3021), and a /32 is a single host.
- Subnet mask and Wildcard mask: the mask has 1s for the network bits (255.255.255.0 for /24). The wildcard is its inverse (0.0.0.255), as used in Cisco ACLs and OSPF.
- Address type: private ranges from RFC 1918 (10/8, 172.16/12, 192.168/16), the CGNAT range 100.64/10, loopback, link-local 169.254/16, documentation ranges, multicast and public addresses. Class (historic) gives the old A–E class, which no longer decides the mask since CIDR.
- Integer value, Hexadecimal and Reverse DNS (PTR) help with databases, firewalls and DNS zones.
The Binary view (network bits | host bits) section shows the address, the mask, the network and the broadcast address in binary, with the network bits highlighted: you can see exactly where the prefix cuts the address.
IPv6
For IPv6 the tool shows the Compressed form (RFC 5952: lowercase, leading zeros removed, the longest run of zero groups replaced by ::) and the Expanded form with all 32 hex digits, plus the network, last address and range. The Total addresses of a /64 is 2^64, about 18.4 quintillion. IPv6 has no broadcast, so every address in the block can be assigned. Typical sizes: /48 for a site, /56 for a home, /64 for one LAN segment.
Subnetting and VLSM
Equal subnets splits the block into at least the number you ask for, rounded up to a power of two: 3 subnets of a /24 become four /26 blocks of 62 hosts. VLSM (hosts per subnet) takes a list such as Sales: 50, IT: 20, Office: 10, sorts it from largest to smallest and gives each group the smallest block that fits its hosts plus the network and broadcast addresses, one after another. Largest-first keeps every block aligned on its own size, which is required for valid subnets. The summary shows how many addresses remain free for growth.
Frequently asked questions
How many hosts are in a /24?
256 addresses, of which 254 are usable hosts. A /25 has 126 usable hosts, a /26 has 62, a /27 has 30, a /28 has 14, a /29 has 6 and a /30 has 2.
Why does the tool refuse 192.168.01.1?
Leading zeros are ambiguous: some systems read 010 as octal (8). Write the address without them.
What is the difference between a netmask and a wildcard mask?
They are bitwise opposites. A netmask marks the network bits with 1s; a wildcard mask marks the bits that may vary. 255.255.255.0 and 0.0.0.255 describe the same /24.
Can I plan VLSM for IPv6?
No. In IPv6 every LAN normally gets a /64, so plan with Equal subnets: for example, split a /48 into /64 blocks.
Is my address sent anywhere?
No. All calculations run in your browser; nothing is looked up or stored.
Related tools
- Number Base Converter Convert numbers between binary, octal, decimal, hexadecimal and any base from 2 to 36, with two's complement, fractions and step-by-step working.
- URL Parser Paste a URL to see its protocol, host, port, path segments, decoded query parameters and fragment, then edit the parameters and rebuild the URL.
- Chmod Calculator Convert Unix file permissions between checkboxes, octal (755) and symbolic (rwxr-xr-x) notation, with setuid, setgid, sticky bit and ready chmod commands.