IPv4 Subnet Calculator
Calculate an IPv4 subnet from an address and CIDR prefix (or dotted subnet mask). Returns the network and broadcast addresses, subnet and wildcard masks, CIDR notation, usable host range, total addresses and usable host count — with correct /31 point-to-point and /32 single-host handling.
Input
A dotted-quad address. You may include the prefix inline (e.g. 192.168.1.0/24) — it overrides the dropdown below.
Pick by prefix (/24) or by its dotted mask (255.255.255.0) — the two label the same option.
Output
| Property | Value |
|---|---|
| No data yet | |
Guides
The IPv4 Subnet Calculator takes an IP address and a network size and works out everything that describes the subnet around it: the network address, the broadcast address, the subnet mask, the wildcard mask, the CIDR notation, the range of usable host addresses, the total number of addresses, and the count of usable hosts. It is the fast way to answer "how many devices fit in this network?" or "what is the broadcast address for 192.168.1.100/24?" without reaching for a whiteboard and binary arithmetic.
How to use it
Type an IPv4 address such as 192.168.1.100, then choose the network size from the dropdown. Each option is labelled with both its CIDR prefix and the equivalent dotted subnet mask — so /24 (255.255.255.0) is one and the same choice. If you already have the prefix, you can paste it straight into the address field (192.168.1.0/24) and it overrides the dropdown. The results table updates as you type.
The tool masks the host bits down to the network automatically, so 192.168.1.100/24 and 192.168.1.0/24 produce the same subnet. Nothing is sent anywhere — the calculation runs entirely in your browser.
What each value means
- Network Address — the first address in the block, identifying the subnet itself.
- Broadcast Address — the last address, used to reach every host in the subnet at once.
- Subnet Mask — the dotted-decimal mask (
255.255.255.0) that separates network bits from host bits. - Wildcard Mask — the inverse of the subnet mask (
0.0.0.255), used in ACLs and OSPF configuration. - CIDR Notation — the canonical
network/prefixform of the block. - Usable Host Range — the first and last addresses you can assign to real devices.
- Total Addresses — every address in the block, including network and broadcast.
- Usable Hosts — how many addresses are actually assignable to devices.
How are usable hosts counted?
For an ordinary subnet, two addresses are reserved — the network and the broadcast — so the usable host count is the total minus two. A /24 holds 256 addresses and 254 usable hosts.
Two prefixes are special cases:
- /31 describes a point-to-point link. Under RFC 3021 there is no network or broadcast reservation, so both of its two addresses are usable. This is the standard for router-to-router links.
- /32 describes a single host — one address, one usable host, with the network and broadcast being the same address. It is common in host routes and loopback definitions.
CIDR prefix to mask reference
/8 is 255.0.0.0 (about 16.7 million addresses), /16 is 255.255.0.0 (65,536), /24 is 255.255.255.0 (256), and /30 is 255.255.255.252 (four addresses, two usable — a classic small point-to-point block). Every prefix from /0 to /32 is available in the dropdown.
Is my data private?
Yes. The subnet math runs locally in your browser using plain 32-bit integer arithmetic. No IP address you enter is uploaded or logged.