IPv4 Subnet Calculator
Enter any IPv4 address and a CIDR prefix from /0 to /32 to identify the subnet that contains it. Review network boundaries, usable addresses, address type, legacy class, wildcard mask, and bit-by-bit binary values.
CIDR Network Block
The entered host belongs to this network block.
Usable Address Range
First to last traditionally assignable host address.
Usable Addresses
256 total addresses in the block.
Address Type
Legacy class C; CIDR remains classless.
| Parameter | Decimal Value | Binary Representation |
|---|---|---|
| IP Address | 192.168.1.1 | 11000000.10101000.00000001.00000001 |
| Subnet Mask | 255.255.255.0 | 11111111.11111111.11111111.00000000 |
| Network Address | 192.168.1.0 | 11000000.10101000.00000001.00000000 |
| Broadcast Address | 192.168.1.255 | 11000000.10101000.00000001.11111111 |
| IP Address | 192.168.1.1 | 11000000.10101000.00000001.00000001 |
| Wildcard Mask | 0.0.0.255 | 00000000.00000000.00000000.11111111 |
IP Address
11000000.10101000.00000001.00000001Subnet Mask
11111111.11111111.11111111.00000000Network Address
11000000.10101000.00000001.00000000Broadcast Address
11000000.10101000.00000001.11111111IP Address
11000000.10101000.00000001.00000001Wildcard Mask
00000000.00000000.00000000.11111111Find the Network That Contains an IPv4 Address
You do not need to enter the network address itself. Enter any address from the subnet, select its CIDR prefix, and the calculator will move the host bits to the correct boundaries. For example, 192.168.1.130/26 belongs to 192.168.1.128/26 even though the address you entered is not the first address in that block.
This is useful when checking an interface configuration, reading a firewall rule, diagnosing why two devices cannot communicate directly, verifying a DHCP scope, or studying subnetting. The tool analyzes one existing CIDR block; it does not divide a parent network into multiple new subnets or build a VLSM allocation plan.
Read Every Result Without Guessing
A subnet result is a set of boundaries, not just a mask. The CIDR block identifies the complete network, the usable range shows the addresses normally available to endpoints, and the wildcard mask expresses the inverse of the subnet mask for systems that use inverse matching.
The table below explains what each displayed value means and where it is commonly used.
What each subnet result means
Swipe horizontally to view the full table.
CIDR Boundaries Do Not Stop at Decimal Dots
Prefixes such as /8, /16, and /24 align neatly with octet boundaries, but most real subnet sizes do not. A /23 crosses two adjacent values in the third octet, while a /26 divides the final octet into blocks of 64 addresses. Looking only at the dotted decimal numbers can hide that boundary.
The binary view exposes it. The subnet mask contains one bit for every network bit and zero for every host bit. A bitwise AND between the entered IP address and that mask produces the network address. Replacing every host bit with one produces the upper boundary, which is the broadcast address for ordinary prefixes from /0 through /30.
This is also why two similar-looking addresses may be in different networks and two addresses with different third octets may still share a /23 subnet.
/31 and /32 Do Not Follow the Usual Minus-Two Rule
The familiar usable-host formula subtracts the network and broadcast addresses. Applying it blindly to every prefix would produce zero usable addresses for /31 and a negative result for /32.
RFC 3021 allows both addresses in a /31 to operate as endpoints on a point-to-point link, without a traditional directed broadcast address. A /32 identifies one address and is commonly used as a host route, loopback route, firewall object, or exact route match.
How /30, /31, and /32 differ
Swipe horizontally to view the full table.
Private and Public Are Not the Only Address Types
RFC 1918 defines three private-use blocks: 10.0.0.0/8, 172.16.0.0/12, and 192.168.0.0/16. An address outside those blocks is not automatically an ordinary public address.
IPv4 also contains shared CGNAT space, loopback addresses, link-local addresses, documentation ranges, benchmarking space, multicast space, and other protocol reservations. The calculator identifies the major categories so an address such as 127.0.0.1 is not incorrectly described as public merely because it is not RFC 1918 private.
A “Public unicast” result means the address is not inside one of the special-use blocks recognized by this calculator. It does not prove that the address is currently allocated, announced through BGP, reachable from your location, or assigned to a particular organization.
Common private and special-use IPv4 ranges
Swipe horizontally to view the full table.
Generic IPv4 Capacity Is Not Always Cloud Capacity
For an ordinary /24, the calculator reports 256 total addresses and 254 traditionally usable host addresses. That is the protocol-level calculation after reserving the network and broadcast addresses.
Cloud platforms, managed networks, and individual organizations may reserve additional addresses for gateways, DNS services, platform infrastructure, or future use. When planning an AWS, Azure, Google Cloud, Kubernetes, VPN, or provider-managed network, treat this calculator as the CIDR boundary check and confirm the provider-specific usable count separately.
The same caution applies when planning growth. A subnet that supports the exact number of devices required today leaves no room for routers, load balancers, failover addresses, temporary workloads, or later expansion.
IPv4 CIDR Quick Reference
The prefixes below cover the subnet sizes most often encountered in LANs, VLANs, cloud networks, firewall rules, point-to-point links, and host routes. Total addresses always follow 2 raised to the number of host bits; usable addresses change for /31 and /32.
Common IPv4 CIDR prefixes
Usable counts use traditional IPv4 rules except for the documented /31 and /32 cases.
Swipe horizontally to view the full table.
IPv4 subnet formulas
IPv4 contains 32 bits. The CIDR prefix states how many belong to the network; the remainder are host bits. The standard usable-address formula applies through /30, while /31 and /32 use separate interpretations.
Formula variables
- CIDR prefix length from 0 to 32
- Number of host bits
- Entered IPv4 address
- Subnet mask
- Network address
- Upper address boundary
- Wildcard mask
- Total addresses in the CIDR block
- Addresses treated as usable by the selected rule
Examples
Find the /26 containing a host address
1Input
IPv4 address: 192.168.1.130; prefix: /26
Show result
Result
Network block: 192.168.1.128/26; subnet mask: 255.255.255.192; broadcast: 192.168.1.191; usable range: 192.168.1.129–192.168.1.190; 62 usable addresses.
A /26 advances in blocks of 64 in the final octet: 0, 64, 128, and 192.
Read a subnet that crosses an octet value
2Input
IPv4 address: 10.10.9.200; prefix: /23
Show result
Result
Network block: 10.10.8.0/23; broadcast: 10.10.9.255; usable range: 10.10.8.1–10.10.9.254; 510 usable addresses.
A /23 combines two adjacent /24-sized ranges. The boundary is controlled by bits, not by the decimal dot.
Calculate a point-to-point /31
3Input
IPv4 address: 192.0.2.10; prefix: /31
Show result
Result
The block is 192.0.2.10/31, containing endpoints 192.0.2.10 and 192.0.2.11. Both may be used on an RFC 3021 point-to-point link.
There is no traditional directed broadcast endpoint under the RFC 3021 interpretation.
Identify one exact address with /32
4Input
IPv4 address: 203.0.113.9; prefix: /32
Show result
Result
The result is the single-address block 203.0.113.9/32, with one total address.
203.0.113.0/24 is reserved for documentation, so the address type is shown as Documentation rather than Public unicast.
Frequently Asked Questions
Can I enter a host address instead of the network address?
Yes. Enter any IPv4 address inside the subnet. The calculator applies the selected mask and returns the normalized network boundary. For example, 192.168.1.130/26 resolves to 192.168.1.128/26.
What does a CIDR prefix such as /24 mean?
It means the first 24 of the IPv4 address’s 32 bits identify the network, leaving eight host bits. Eight host bits produce 256 total addresses.
What is the difference between total addresses and usable addresses?
Total addresses counts every value in the CIDR block. In ordinary /0 through /30 subnets, the network and broadcast addresses are normally reserved, leaving two fewer usable addresses. The /31 and /32 prefixes use different rules.
Why does a /24 have 254 usable addresses?
A /24 leaves eight host bits, producing 2⁸ or 256 total addresses. Under traditional IPv4 subnetting, the first identifies the network and the last is the broadcast address, leaving 254.
Why does this calculator show two usable /31 addresses?
RFC 3021 permits both addresses in a /31 on a point-to-point link. The all-zero and all-one host values are treated as endpoints rather than traditional network and directed-broadcast addresses.
What does a /32 subnet represent?
A /32 represents one exact IPv4 address. It is commonly used for host routes, loopback routes, firewall objects, and routing-policy matches rather than as a multi-device LAN.
What is the difference between a subnet mask and a wildcard mask?
A subnet mask uses ones for network bits and zeros for host bits. A wildcard mask reverses every bit. For example, 255.255.255.0 has the wildcard mask 0.0.0.255.
Why is an address outside RFC 1918 not always public?
IPv4 includes several other special-use blocks. Examples include 127.0.0.0/8 for loopback, 169.254.0.0/16 for link-local communication, 100.64.0.0/10 for shared CGNAT space, and three ranges reserved for documentation.
Are IPv4 address classes still used for subnetting?
Modern routing and allocation use classless CIDR prefixes. Class A, B, and C can still appear in training material and legacy terminology, but the selected CIDR prefix—not the historical class—determines the network boundary.
Does the usable count match AWS, Azure, or other cloud platforms?
Not necessarily. The calculator reports generic IPv4 capacity. Cloud providers may reserve additional addresses inside each subnet for platform services, gateways, DNS, or infrastructure.
Does this calculator split a network into subnets?
No. It analyzes the single CIDR block containing the entered address. Dividing a parent network into equal subnets or different-sized VLSM blocks requires a subnet planner.
Does the calculator support IPv6?
No. It is deliberately limited to 32-bit IPv4 addresses. IPv6 uses 128-bit addresses and different conventions, including no IPv6 broadcast address.
Are the entered IP addresses uploaded or stored?
The calculation runs in the browser and does not require an account, network scan, server lookup, or file upload.
References
- RFC 791 — Internet Protocol
- RFC 4632 — Classless Inter-domain Routing: The Internet Address Assignment and Aggregation Plan
- RFC 3021 — Using 31-Bit Prefixes on IPv4 Point-to-Point Links
- RFC 1918 — Address Allocation for Private Internets
- RFC 6598 — IANA-Reserved IPv4 Prefix for Shared Address Space
- RFC 3927 — Dynamic Configuration of IPv4 Link-Local Addresses
- RFC 5737 — IPv4 Address Blocks Reserved for Documentation
- IANA — IPv4 Special-Purpose Address Space
You might also like
RAID Capacity Calculator
Calculate usable RAID capacity, parity or mirror overhead, hot-spare reserve, efficiency, binary capacity, and disk-failure tolerance.
Hash Generator & Checksum Checker
Generate SHA-256, SHA-384, or SHA-512 locally and compare files or text with a published checksum.
My Screen Size
Instantly check your browser-reported screen resolution, live viewport, aspect ratio, device pixel ratio, estimated device pixels, color depth, and touch support.
Safe CSV Import Doctor
Validate UTF-8 CSV structure, detect spreadsheet conversion hazards, and export auditable repairs without coercing identifiers, numbers, or dates.