Understanding Subnetting and CIDR Prefix Notation
An IPv4 subnet calculator finds the address block containing a chosen IP address. CIDR prefix notation states how many of the address’s 32 bits belong to the network. For 192.168.1.100/24, the first 24 bits identify the network and the remaining eight identify positions inside it. Classless Inter-Domain Routing allows these boundaries to differ from historical Class A, B, or C defaults. Enter an address with an inline prefix, or choose an equivalent subnet mask from the selector.
The subnet mask bitwise AND operation clears the host bits to produce the network address. Setting those host bits to one gives the last address in the block, ordinarily its broadcast address. The wildcard mask is the inverse of the subnet mask: zero bits identify positions that must match and one bits identify positions that can vary. The visualizer marks network bits in indigo and host bits in emerald, with N and H labels so the distinction does not depend on color alone.
Usable Hosts, Special Prefixes, and Address Scope
For ordinary broadcast subnets, subtract two from the total address count to obtain the usable host range: one address identifies the network and another the broadcast. A /31 point-to-point link instead treats both addresses as endpoints under RFC 3021. A /32 describes one address, often used as a host route. Neither has a separate directed broadcast. The tool labels these cases explicitly instead of reporting misleading first and last addresses. Equipment and topology must support the intended point-to-point configuration.
An RFC 1918 private IP belongs to 10/8, 172.16/12, or 192.168/16, but an address outside those ranges is not automatically globally routable. Loopback, link-local, documentation, shared carrier-grade NAT, multicast, and reserved addresses also need special treatment. This calculator labels common special ranges and treats other addresses as public candidates, without testing reachability. Scope describes the entered address, not every member of a large subnet. A /0 calculation spans all IPv4 addresses and therefore crosses many operational scopes.
Standard IPv4 CIDR to Subnet Mask Reference Table
| CIDR Prefix | Subnet Mask | Usable Hosts | Class |
|---|---|---|---|
| /24 | 255.255.255.0 | 254 | Classless; historically Class C-sized |
| /25 | 255.255.255.128 | 126 | Classless |
| /26 | 255.255.255.192 | 62 | Classless |
| /27 | 255.255.255.224 | 30 | Classless |
| /28 | 255.255.255.240 | 14 | Classless |
| /29 | 255.255.255.248 | 6 | Classless |
| /30 | 255.255.255.252 | 2 | Classless |
Technical references
How to use IPv4 / CIDR Subnet Calculator
1. Enter the input
Enter a dotted IPv4 address, optionally followed by /0 through /32. Avoid leading zeros so decimal interpretation is explicit.
2. Inspect the local result
Choose a CIDR prefix or equivalent mask. An inline prefix takes priority; changing the selector replaces that inline choice.
3. Apply the result carefully
Review network boundaries, host counts, scope, and colored bits. Copy the values you need and verify the intended topology before configuring equipment.
Key features and technical specifications
Local processing
Inputs stay in browser memory; no query or certificate is sent to a processing service.
Explicit limits
Results describe supplied data and bundled references, not live network measurements.
Use this result with its limits in mind
These tools transform supplied data locally. They do not scan devices, verify ownership, or confirm that a network service is secure.
Prepare configuration notes
Copy normalized values and check their meaning before applying a production change.
Learn protocol representations
Compare the examples and reference table with the interactive result.
Frequently asked questions
Why do /31 and /32 subnets have special host rules?
RFC 3021 permits two usable endpoints on an appropriate /31 point-to-point link, where a directed broadcast is unnecessary. A /32 identifies one address. These exceptions avoid subtracting network and broadcast reservations that do not apply in those contexts.
What is a wildcard mask used for?
Wildcard masks appear in some access lists and routing configuration. A zero bit means compare the corresponding address bit, while a one bit means ignore it. This tool returns the inverse of a contiguous subnet mask; device-specific wildcard rules may support other patterns.
How do you calculate usable host counts?
For prefixes /0 through /30, use 2 raised to the number of host bits, then subtract two. For /31 and /32, this calculator reports two and one respectively. Arithmetic capacity does not establish that special-use addresses can be allocated to ordinary hosts.
Does an IP class determine the subnet mask?
No. Classful addressing is historical. Modern CIDR uses the prefix you specify, so a Class A-looking address can be part of a /24 or another prefix. The class badge is descriptive background and does not change the calculation.
Does this calculator contact the address I enter?
No. It converts the entered text to an unsigned integer and performs local bitwise arithmetic. No packet is sent to the entered address, and there is no DNS query or remote subnet service. Keep a separate record if you need to retain results.