01What is Subnet Calculator?
Subnet math is easy until you have to do it at 2 a.m. during an outage. This calculator takes an IPv4 address and a prefix length and gives you the whole subnet in one view. Type an address and set the prefix in the / CIDR box, or click one of the quick buttons for /8, /16, /20, /24, /28, /30, /31 and /32. You can also paste a block such as 10.0.0.0/16 straight into the IP Address field, and the prefix box locks to match it. Under the hood the address becomes a 32-bit integer. The tool builds a mask from the prefix, ANDs it with the address to get the network, and ORs in the inverted mask to get the broadcast. That is why a host address works as input. Give it 192.168.1.130 with /26 and you get 192.168.1.128/26, broadcast 192.168.1.191, mask 255.255.255.192, wildcard 0.0.0.63, hosts 192.168.1.129 to 192.168.1.190, and 62 usable out of 64. You don't need to know where the block starts. The results list the network, broadcast, subnet mask, wildcard mask (the inverse mask Cisco ACLs and OSPF network statements expect), first and last host, usable hosts, total addresses and the address range type. That last field checks the network against the IANA special-purpose ranges, so you see labels like Private (RFC 1918), Shared address space (carrier-grade NAT, RFC 6598), Documentation (TEST-NET, RFC 5737), Loopback or Public. For example, 203.0.113.50/28 comes back as Documentation (TEST-NET-3), a handy reminder that it never belongs on a real network. Two edge cases follow the standards rather than the textbook formula. A /31 follows RFC 3021: both addresses are usable on a point-to-point link and there is no broadcast. A /32 is a single host. For everything else, usable hosts are total addresses minus two. Input checks are strict on purpose. Octets above 255, leading zeros like 192.168.01.1, missing octets and prefixes outside 0 to 32 show a red error message instead of a quietly wrong answer. Leading zeros are rejected because some parsers read them as octal. What it won't do: it is IPv4 only, and it handles one block at a time. There is no subnet splitting, VLSM planner or overlap checker, though the tips below show how to do those by hand. The math happens in the page itself, so the addresses you type never leave your machine.
Network engineers sizing IP plans, cloud engineers carving VPC subnets, and sysadmins working out which network a misbehaving host sits on. The tool runs entirely in your browser, so your data never leaves your device.
02How to use Subnet Calculator
- Type an IPv4 address in the IP Address field, or paste a CIDR block like 192.168.1.0/24.
- Set the prefix in the / CIDR box or click a quick button such as /24 or /28. Clicking a button also removes a pasted /prefix so the button value takes over.
- Read the Network, Broadcast, Subnet Mask, Wildcard Mask, First Host and Last Host rows.
- Check Usable Hosts, Total Addresses and Address Range Type.
- Change the prefix to watch the block grow or shrink around the same address.
03Worked examples
- Input:
192.168.1.130 /26 - Result:
Network 192.168.1.128/26, Broadcast 192.168.1.191, Mask 255.255.255.192, Wildcard 0.0.0.63, Hosts 192.168.1.129 - 192.168.1.190, Usable 62 of 64, Private (RFC 1918) - An address inside the block is masked down to the network address, so you don't need to know where the block starts.
- Input:
10.0.0.0/16 (pasted into the address field) - Result:
Network 10.0.0.0/16, Broadcast 10.0.255.255, Mask 255.255.0.0, Wildcard 0.0.255.255, Usable 65534 of 65536 - Input:
172.20.5.9 /12 - Result:
Network 172.16.0.0/12, Broadcast 172.31.255.255, Mask 255.240.0.0, Wildcard 0.15.255.255, Usable 1048574 - A /12 boundary falls inside the second octet, so 172.20 rounds down to 172.16.
- Input:
100.64.3.7 /10 - Result:
Network 100.64.0.0/10, Broadcast 100.127.255.255, Mask 255.192.0.0, Usable 4194302, Shared address space (carrier-grade NAT) - RFC 6598 space. It is not RFC 1918, but it is not publicly routable either.
- Input:
10.1.1.4 /31 - Result:
Network 10.1.1.4/31, Broadcast n/a (/31 and /32 have none), Hosts 10.1.1.4 - 10.1.1.5, Usable 2 - Following RFC 3021, both addresses of a /31 point-to-point link are usable, instead of the usual total minus two.
- Input:
192.168.01.1 /24 - Result:
Enter a valid IPv4 address (four 0-255 octets, no leading zeros) and a prefix from 0 to 32 - The leading zero in the third octet is rejected rather than guessed at.
04Common use cases
- Working out the usable host range for a CIDR block before creating an AWS, Azure or GCP subnet
- Finding which subnet a server's address belongs to when a ticket only gives you the IP and the prefix
- Getting the wildcard mask for a Cisco ACL or OSPF network statement from a prefix length
- Checking that a /31 router-to-router link gives two usable addresses before you configure both ends
- Confirming that an address in a log is private, carrier-grade NAT or documentation space before you chase it as a public IP
- Checking subnetting answers while studying for CCNA or Network+
05Tips
- A /24 has 256 addresses but 254 usable hosts. AWS also reserves the second, third and fourth addresses in every subnet (router, DNS, future use), leaving 251.
- Each extra prefix bit halves the block: /24 = 256, /25 = 128, /26 = 64, /27 = 32, /28 = 16. To plan variable-length subnets, place the largest group of hosts first and carve smaller blocks from what is left.
- Two blocks overlap exactly when they give the same network after both are masked with the shorter prefix. Enter each address here with that shorter prefix and compare the Network rows.
- Use /31 for router-to-router links to save addresses. Most current router operating systems support RFC 3021, but check older gear first.
- If a pasted address gets rejected, look for a leading zero such as 10.0.07.1. Strip it and the calculator will accept the address.
06Related concepts
CIDR notation, VLSM, Network address, Broadcast address, Wildcard mask, RFC 1918.
Frequently Asked Questions
What is Subnet Calculator?
Subnet Calculator is a free, browser-based developer tool on AIDToolStack. IPv4 subnet calculator with CIDR notation, network and broadcast addresses. It requires no installation or sign-up and works entirely in your browser.
Is Subnet Calculator free to use?
Yes. No sign-up, no fees and no usage cap.
Does Subnet Calculator store my data?
No. It runs in your browser; nothing is uploaded.