You don't have javascript enabled. Please enable javascript to use this website.

Subnet Calculator

Network, broadcast, mask and host range for any IPv4 CIDR, plus a subnet splitter and an "is this IP inside?" check.

Click a bit to move the prefix

Result
Usable hosts
Usable range
Broadcast
Subnet mask
FieldValue

Split into smaller subnets

subnets

Is an IP address in this network?

More Tools

Subnet Calculator — What the Results Tell You

Subnet calculation applies a binary mask — defined by the CIDR prefix length — to an IPv4 address to produce four network parameters: the network address (first address in the block), the broadcast address (last address), the subnet mask in dotted-decimal notation, and the usable host range. CIDR prefix lengths run from /8 (16,777,214 usable hosts) to /30 (2 usable hosts). Prefixes /31 and /32 are special cases defined in RFC 3021 and RFC 950 respectively.

CIDR Prefix Subnet Mask Total Addresses Usable Hosts Common Use
/8255.0.0.016,777,21616,777,214Class A — large enterprise or ISP
/16255.255.0.065,53665,534Class B — campus network
/24255.255.255.0256254Standard LAN — home and office
/26255.255.255.1926462Small office segment
/28255.255.255.2401614Small VLAN or DMZ
/30255.255.255.25242Point-to-point link (traditional)
/31255.255.255.25422Point-to-point link (RFC 3021)
/32255.255.255.25511 (host route)Loopback or single-host ACL

What Does Each Result Field Mean?

Field Meaning Example (/24)
Network Address First address in the subnet — identifies the network, cannot be assigned to a host 192.168.1.0
Usable Host Range First and last addresses assignable to hosts — the range between network and broadcast 192.168.1.1 – 192.168.1.254
Broadcast Address Last address in the subnet — delivers a packet to all hosts in the subnet, cannot be assigned to a host 192.168.1.255
Subnet Mask 32-bit mask in dotted-decimal notation indicating which bits are network bits 255.255.255.0
Wildcard Mask Bitwise inverse of the subnet mask — used in Cisco ACLs and OSPF area statements 0.0.0.255
Total Hosts All addresses in the block, including network and broadcast 256
Usable Hosts Assignable addresses — total minus 2, except /31 (RFC 3021) and /32 254

How to Use the IPv4 Subnet Calculator

Type or paste an IPv4 address, for example 192.168.1.10. You can paste it with its prefix (192.168.1.10/24) or its subnet mask (192.168.1.10 255.255.255.0); results update as you type.

1

Select a CIDR Prefix

Choose a prefix from /0 to /32 in the list (each option shows the mask and the number of hosts), drag the slider, or click a bit in the bit strip.
2

Split the Network or Check an IP

Split the network into a number of subnets, or into subnets with enough hosts each, and copy the plan as a table. Paste any IP to check whether it belongs to the network.
3

Read the Results Table

Review network address, broadcast address, subnet mask, wildcard mask, total hosts, and usable host range in the results table. All values update in real time — no page reload required.
4

Interpret /31 and /32 Prefixes

A /31 prefix returns 2 usable addresses with no broadcast address — correct per RFC 3021 for point-to-point links. A /32 is a single-host route where the network address and host address are identical.

How IPv4 Subnetting Works — Technical Details

IPv4 subnetting (RFC 950, 1985) divides a 32-bit address into a network prefix and a host identifier by applying a binary AND operation between the IP address and the subnet mask. The network address is the result of that AND. The broadcast address is produced by applying the wildcard mask — the bitwise inverse of the subnet mask — to the network address with a binary OR operation.

CIDR (Classless Inter-Domain Routing, RFC 4632) replaced the original Class A/B/C system and allows prefix lengths of any value from /0 to /32, enabling variable-length subnet masking (VLSM). A /24 prefix allocates 28 = 256 addresses; a /16 allocates 216 = 65,536; a /8 allocates 224 = 16,777,216.

The /31 prefix is a special case defined in RFC 3021 (2000) for point-to-point links between two routers. Standard subnetting would subtract a network address and broadcast address, leaving 0 usable hosts. RFC 3021 eliminates the broadcast requirement for /31 networks, making both addresses usable. This is widely deployed on backbone router-to-router links to conserve public address space.

The three private IPv4 address blocks defined in RFC 1918 — 10.0.0.0/8, 172.16.0.0/12, and 192.168.0.0/16 — may be subnetted without restriction. Routers on the public internet will not forward packets sourced from or destined to these ranges.

On Linux and macOS, the ipcalc utility performs equivalent calculations at the command line: ipcalc 192.168.1.0/24 returns network address, broadcast, netmask, and host range. This tool produces the same output interactively in the browser with no software installation required.

Common Uses for a Subnet Calculator

Network capacity planning. A network engineer allocating address space across three office floors — each requiring 50 hosts — needs to choose an appropriate CIDR prefix. A /26 (62 usable hosts) fits the requirement with headroom; a /25 (126 usable hosts) is wasteful for 50 devices. The calculator shows the exact range and host count for any prefix without manual binary arithmetic.

Cloud VPC subnet design. A cloud architect configuring AWS, Azure, or GCP VPC subnets must define non-overlapping CIDR blocks for each availability zone. A mistake — such as assigning 10.0.1.0/24 and 10.0.1.128/25 to two subnets — creates an overlap that breaks routing. The subnet calculator confirms network address and broadcast boundaries before any infrastructure is provisioned.

Certification exam preparation. A student studying for the CompTIA Network+ or Cisco CCNA exam uses the calculator to verify manual subnet calculations. The interactive bit visualizer directly shows which bits shift as the prefix length changes — reinforcing the binary logic that exam questions test.


Frequently Asked Questions

What is the difference between a subnet mask and a CIDR prefix?
A subnet mask and a CIDR prefix convey identical information in two different formats. A /24 prefix is equivalent to the subnet mask 255.255.255.0 — both indicate that 24 bits identify the network and 8 bits identify the host. CIDR notation (Classless Inter-Domain Routing, RFC 4632) is the compact, modern standard used in routing tables, firewall rules, and cloud VPC configuration.
How many usable hosts does a /24 subnet provide?
A /24 subnet contains 256 total addresses (2 raised to the power of 8). Two are reserved — the network address (first, e.g. 192.168.1.0) and the broadcast address (last, e.g. 192.168.1.255) — leaving 254 usable host addresses ranging from x.x.x.1 to x.x.x.254. A /24 is the standard subnet size for home networks and small office LANs.
Why does a /31 subnet have 2 usable addresses instead of 0?
Standard subnetting rules would yield 0 usable hosts in a /31 after subtracting the network and broadcast addresses. RFC 3021 redefined /31 prefixes specifically for IPv4 point-to-point links where only two addresses are needed and no broadcast is required — so both addresses are fully usable. A /31 conserves addresses versus a /30, which wastes 2 of its 4 addresses on overhead. This calculator implements RFC 3021 correctly.
Do you store the IP addresses entered into the subnet calculator?
No. The subnet calculator runs entirely in your browser using JavaScript — no input data is transmitted to a server, and no IP addresses, subnet values, or CIDR prefixes are logged or stored.
What are the private IPv4 address ranges I can subnet for internal use?
RFC 1918 reserves three IPv4 blocks for private use: 10.0.0.0/8 (over 16 million addresses), 172.16.0.0/12 (approximately 1 million addresses), and 192.168.0.0/16 (65,536 addresses). These ranges are not routable on the public internet. Organizations may subnet them freely for internal networks without obtaining globally unique address allocations from an RIR.
How is the wildcard mask calculated from the subnet mask?
The wildcard mask is the bitwise inverse of the subnet mask. For a /24 subnet mask of 255.255.255.0 — binary 11111111.11111111.11111111.00000000 — inverting every bit produces 00000000.00000000.00000000.11111111, which is 0.0.0.255. Wildcard masks are used in Cisco router access control lists (ACLs) and OSPF area statements to specify which bits of an address must match a rule.

Related Guides

Guide What is an IP address?
understand the 32-bit addressing structure that subnet masks divide into network and host portions.
Guide What is IPv4?
the full IPv4 addressing model, including address classes and the CIDR transition that subnet calculators are built around.
Guide Public IP vs. Private IP
which address ranges (RFC 1918) are reserved for internal subnets and why they cannot be routed on the public internet.