Skip to content

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

192.168.1.0/24

The entered host belongs to this network block.

Usable Address Range

192.168.1.1 - 192.168.1.254

First to last traditionally assignable host address.

Usable Addresses

254

256 total addresses in the block.

Address Type

Private (RFC 1918)

Legacy class C; CIDR remains classless.

IP Address

Decimal
192.168.1.1
Binary
11000000.10101000.00000001.00000001

Subnet Mask

Decimal
255.255.255.0
Binary
11111111.11111111.11111111.00000000

Network Address

Decimal
192.168.1.0
Binary
11000000.10101000.00000001.00000000

Broadcast Address

Decimal
192.168.1.255
Binary
11000000.10101000.00000001.11111111

IP Address

Decimal
192.168.1.1
Binary
11000000.10101000.00000001.00000001

Wildcard Mask

Decimal
0.0.0.255
Binary
00000000.00000000.00000000.11111111

Find 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

What each subnet result means
ResultMeaningTypical use
CIDR network blockThe normalized network address followed by its prefixRoutes, firewall rules, IPAM records, and subnet documentation
Subnet maskNetwork bits shown as ones and host bits shown as zerosInterface and legacy network configuration
Network addressThe lower boundary produced by setting every host bit to zeroIdentifying and routing the subnet
Broadcast addressThe upper boundary produced by setting every host bit to oneDirected broadcast boundary for ordinary /0–/30 subnets
Usable rangeThe addresses between the reserved boundaries under standard rulesEndpoint, server, interface, and DHCP planning
Wildcard maskThe bitwise inverse of the subnet maskACLs, route matching, and some routing-protocol configurations
Binary representationThe exact 32-bit address and mask divided into four octetsLearning, verification, and troubleshooting boundary mistakes

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

How /30, /31, and /32 differ
PrefixTotal addressesUsable addressesInterpretation
/3042Traditional subnet with separate network and broadcast addresses
/3122Both endpoints may be used on an RFC 3021 point-to-point link
/3211One exact address, normally represented as a host route

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

Common private and special-use IPv4 ranges
RangeAddress typePurpose
10.0.0.0/8PrivateRFC 1918 internal addressing
172.16.0.0/12PrivateRFC 1918 internal addressing
192.168.0.0/16PrivateRFC 1918 internal addressing
100.64.0.0/10SharedCarrier-grade NAT under RFC 6598
127.0.0.0/8LoopbackCommunication with the local host
169.254.0.0/16Link-localCommunication limited to the local link
192.0.2.0/24DocumentationTEST-NET-1 examples
198.51.100.0/24DocumentationTEST-NET-2 examples
203.0.113.0/24DocumentationTEST-NET-3 examples
198.18.0.0/15Benchmark testingControlled network-device benchmarking
224.0.0.0/4MulticastIPv4 multicast addressing
240.0.0.0/4ReservedReserved and special-use address space

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.

Common IPv4 CIDR prefixes
CIDRSubnet maskWildcard maskTotal addressesUsable
/8255.0.0.00.255.255.25516,777,21616,777,214
/12255.240.0.00.15.255.2551,048,5761,048,574
/16255.255.0.00.0.255.25565,53665,534
/20255.255.240.00.0.15.2554,0964,094
/21255.255.248.00.0.7.2552,0482,046
/22255.255.252.00.0.3.2551,0241,022
/23255.255.254.00.0.1.255512510
/24255.255.255.00.0.0.255256254
/25255.255.255.1280.0.0.127128126
/26255.255.255.1920.0.0.636462
/27255.255.255.2240.0.0.313230
/28255.255.255.2400.0.0.151614
/29255.255.255.2480.0.0.786
/30255.255.255.2520.0.0.342
/31255.255.255.2540.0.0.122 on point-to-point links
/32255.255.255.2550.0.0.011 host route

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
Host bits
Total addresses
Network address
Upper boundary
Wildcard mask
Traditional usable addresses
/31 point-to-point addresses
/32 host-route address

Examples

Find the /26 containing a host address

1

Input

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

2

Input

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

3

Input

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

4

Input

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.