Subnet Calculator
Network address, broadcast, mask, host range and binary breakdown — for IPv4.
The Subnet Calculator works out every IPv4 addressing parameter from an address and mask: network address, broadcast address, usable host range, and the split into smaller subnets. Results match the classic ipcalc command, and the binary breakdown shows exactly where the numbers come from.
What is a subnet calculator?
Every IPv4 address consists of two parts: a network identifier and a host identifier. The boundary between them is set by the subnet mask — and that mask is what all network calculations are built on. A subnet calculator automates the arithmetic: instead of converting octets to binary and applying the mask by hand, you enter an address in CIDR notation and immediately see the network address, the broadcast address, and the exact range of addresses you can assign to devices.
In practice, you reach for it when planning the IP addressing of a new network, splitting an existing pool into segments (subnetting), or configuring firewall and routing rules — and when studying for exams such as CCNA or CompTIA Network+, where mask calculations are something you need to understand, not just click through.
How to use the calculator
- Enter an IP address — either the address on its own (e.g.
192.168.0.1) or full CIDR notation straight away (e.g.192.168.0.1/24) in the ‘IP address (or CIDR)’ field. - Set the mask — if you didn’t include a prefix in the address, pick one in the ‘Mask /’ field (any value from 0 to 32).
- Optionally, split the network — enter a target prefix in the ‘Split into /’ field and the calculator will break the network down into a list of smaller subnets, each with its own parameters.
- Click ‘Calculate’ — the results appear below; every value can be copied with a single click.
How to read the results
- Network address — the first address of the subnet, its identifier. It is never assigned to a device; it’s how you refer to the network in routing tables and firewall rules.
- Mask — shown in both notations, dotted decimal and CIDR (e.g.
255.255.255.0 = /24). Same information, two ways of writing it. - Wildcard — the inverse of the mask (e.g.
0.0.0.255), used among other things in ACLs on Cisco devices. - First and last host — the actual usable host range, i.e. the addresses you can assign to devices.
- Broadcast — the last address of the subnet, reserved as the broadcast address; a packet sent to it reaches every host in the segment.
- Hosts / network — the number of usable addresses. For a /24 prefix that’s 254, because two of the 256 addresses are taken by the network and broadcast addresses.
- Class — the historical address class (A, B, C, D or E), derived from the first octet. Addressing is classless (CIDR) these days, but classes still turn up in documentation and on exams.
- Type — whether the address falls within the private ranges defined in RFC 1918 or is a public address.
The binary breakdown section colour-codes the bits of the address: the network portion, any subnet bits, and the host bits each get their own colour. It makes it plain to see why the network address has all zeros in the host portion — and the broadcast address all ones.
Splitting a network into subnets (subnetting)
Subnetting means “borrowing” bits from the host portion and using them to address subnets. Each additional prefix bit doubles the number of subnets and halves the number of hosts in each: one /24 network becomes two /25s (126 hosts each) or four /26s (62 hosts each).
Why do it? Smaller segments contain broadcast traffic, simplify security rules and give the network a logical structure — one subnet for servers, one for workstations, one for guests. A well-planned split also cuts down on wasted addresses: rather than reserving a /24 for a point-to-point link that needs two addresses, a /30 will do. This is the idea behind VLSM (Variable Length Subnet Masking) — using masks of different lengths within a single network, standard practice in any non-trivial addressing plan.
Enter the target prefix in the ‘Split into /’ field and the calculator will list all the resulting subnets along with their addresses, host ranges and binary breakdowns.
CIDR notation — the most common prefixes
CIDR notation writes the mask as the number of network bits after a slash. A few values worth knowing by heart:
| Prefix | Mask | Hosts |
|---|---|---|
| /30 | 255.255.255.252 | 2 (point-to-point links) |
| /29 | 255.255.255.248 | 6 |
| /27 | 255.255.255.224 | 30 |
| /24 | 255.255.255.0 | 254 (typical LAN) |
| /16 | 255.255.0.0 | 65,534 |
| /8 | 255.0.0.0 | 16,777,214 |
Private and public addresses
RFC 1918 reserves three address ranges for use in private networks: 10.0.0.0/8, 172.16.0.0/12 and 192.168.0.0/16. Addresses from these ranges are not routed on the internet — you can use them freely within your own infrastructure, with NAT handling communication with the outside world. The calculator flags such addresses as private, which makes it easy to catch, say, a typo that turns a “private” server address into a public one.
Knowing the boundaries of your own subnets pays off well beyond addressing plans, too. Network traffic monitoring systems — such as Sycope — group statistics and alerts precisely per subnet, so a well-thought-out addressing scheme translates directly into a clearer picture of what’s happening on the network.
Frequently asked questions (FAQ)
How many hosts fit in a /24 network?
A /24 network holds 254 hosts. The /24 prefix leaves 8 bits for addresses — 256 combinations — two of which are reserved for the network address and the broadcast address.
Why do you subtract 2 from the number of addresses?
The first address of a subnet identifies the network itself, and the last one serves as the broadcast address. Neither can be assigned to a device. The exceptions are /31 prefixes (point-to-point links per RFC 3021) and /32 (a single host, known as a host route).
What’s the difference between the network address and the broadcast address?
The network address has all zeros in the host portion in binary and identifies the subnet as a whole. The broadcast address has all ones and is used to reach every host in the segment at once.
What is a wildcard mask?
It’s the bitwise inverse of the subnet mask — for the mask 255.255.255.0, the wildcard is 0.0.0.255. It’s used in Cisco ACLs and OSPF configuration, among other places, to indicate which bits of an address should be matched.
Does the calculator support IPv6?
This tool handles IPv4 addressing. Subnetting works differently in IPv6 (the standard subnet is a /64, with 2^64 addresses), so it calls for a separate calculator.
What does 192.168.0.0/16 mean?
That’s CIDR notation: the address 192.168.0.0 with a 16-bit network prefix (mask 255.255.0.0). The network spans every address from 192.168.0.0 to 192.168.255.255 — it’s one of the private ranges defined in RFC 1918.
Do the results match ipcalc?
Yes — the calculator computes exactly what the ipcalc command on Linux does, including the binary breakdown and the subnet split.