Subnet Calculator
Enter an IP address with its prefix (192.168.1.10/24) or subnet mask (255.255.255.0) to instantly see the network, broadcast, first and last host and how many hosts fit. Works with IPv4 and IPv6.
- Network
- —
- Subnet mask
- —
- Wildcard mask
- —
- Broadcast
- —
- First host
- —
- Last host
- —
- Usable hosts
- —
- Type
- —
Split into subnets
Results are estimates. Solvemis accepts no responsibility for the results obtained or for how they are used.
Solvemis is free, with no sign-up. If it helped and you’d like to support the project: Buy me a coffee
How it works
How to use it
- Enter the IP address. You can add the prefix (/24) or the subnet mask (255.255.255.0) after it.
- If you don't, pick the prefix from the list: each one shows its mask.
- Read the network, mask, broadcast and host range in the table.
- To divide the network, open “Split into subnets” and choose the size of each one.
How it is calculated
The network comes from applying the mask to the address (a bitwise AND) and the broadcast from setting every host bit to one. Prefixes and masks follow CIDR (RFC 4632); /31 follows RFC 3021; IPv6 follows RFC 4291 and /127 RFC 6164; the short IPv6 form follows RFC 5952. The address type (private, CGNAT, documentation...) comes from the IANA special-purpose address registry (RFC 6890) and RFC 1918.
Sources
- RFC 4632: Classless Inter-domain Routing (CIDR) — IETF (RFC Editor)
- RFC 3021: Using 31-Bit Prefixes on IPv4 Point-to-Point Links — IETF (RFC Editor)
- RFC 4291: IP Version 6 Addressing Architecture — IETF (RFC Editor)
- RFC 6164: Using 127-Bit IPv6 Prefixes on Inter-Router Links — IETF (RFC Editor)
- RFC 1918: Address Allocation for Private Internets — IETF (RFC Editor)
- IANA IPv4 Special-Purpose Address Registry — IANA
About this calculator
Reading an address with a prefix
In 192.168.1.10/24, the /24 says how many bits from the left are the
network: 24 out of 32. The remaining 8 are for hosts (the devices). The
subnet mask is the same thing written another way: 24 ones followed by 8
zeros, 255.255.255.0.
The drawing under the result shows the address in binary with the network part in blue. It shows why a /20 doesn’t fall on a dot: it cuts the third octet in half.
What the calculator gives you
- Network: the first address of the block, with every host bit set to zero.
- Broadcast: the last one, with every host bit set to one. Whatever is sent there reaches every device on the network.
- First and last host: the range you can assign to devices.
- Usable hosts: 2^(32 − prefix) − 2.
- Wildcard mask: the mask inverted, as Cisco ACLs expect it.
- Type: public, private, CGNAT, documentation… and its old class (A, B or C), which still shows up in many courses.
Common IPv4 prefixes
| Prefix | Subnet mask | Hosts |
|---|---|---|
| /8 | 255.0.0.0 | 16,777,214 |
| /16 | 255.255.0.0 | 65,534 |
| /24 | 255.255.255.0 | 254 |
| /26 | 255.255.255.192 | 62 |
| /28 | 255.255.255.240 | 14 |
| /30 | 255.255.255.252 | 2 |
| /31 | 255.255.255.254 | 2 (point-to-point) |
| /32 | 255.255.255.255 | 1 |
Splitting a network into subnets
Each bit you add to the prefix cuts the network in two. A /24 split into /26 gives four subnets of 64 addresses (62 hosts each): .0, .64, .128 and .192. Open “Split into subnets”, pick the size and you’ll see the first ones with their ranges.
Private and special addresses
Home and office addresses are usually private (RFC 1918): 10.0.0.0/8,
172.16.0.0/12 and 192.168.0.0/16. They don’t reach the internet; the
router translates them to the public one. If your router has an IP in
100.64.0.0/10, you are behind your ISP’s carrier-grade NAT and share a
public IP with other customers. To find yours, use
What Is My IP?.
IPv6
IPv6 addresses have 128 bits and are written in hexadecimal. The calculator
shows the short form (with ::) and the full one. There is no broadcast, and a
local network is always a /64: more than 18 quintillion addresses.
Frequently asked questions
How many hosts are in a /24?
254. A /24 has 256 addresses (2 to the power of 8), but the first one is the network address and the last one is the broadcast, which leaves 254 for devices. In general, an IPv4 network with prefix n has 2^(32 − n) − 2 hosts, except /31 and /32.
What is a wildcard mask?
It is the subnet mask inverted: ones where the mask has zeros. For 255.255.255.0 it is 0.0.0.255. Cisco access control lists (ACLs) and OSPF use it to say which bits of the address must match.
Why does a /31 have two hosts?
Because a link between two routers needs no network or broadcast address. RFC 3021 allows both addresses of a /31 to be used as hosts, so a link no longer wastes four addresses.
What about IPv6?
IPv6 has no broadcast, so every address in the block can be used. A local network normally gets a /64, and each customer a /48 or /56. For links between routers, /127 is recommended (RFC 6164).
Updated 2 October 2026
Missing something in this tool, or a tool we don't have? Write to us