100% Client-Side — Nothing Leaves Your Browser

Subnet Calculator

Enter an IPv4 address with CIDR prefix to instantly calculate network address, broadcast address, subnet mask, wildcard mask, usable host range, and IP class. Switch to the VLSM planner to divide a network into optimally-sized subnets.

/0 (all IPs)/32 (single host)

Results for 192.168.1.0/24

Network Address
192.168.1.0
Broadcast Address
192.168.1.255
Subnet Mask
255.255.255.0
Wildcard Mask
0.0.0.255
First Usable Host
192.168.1.1
Last Usable Host
192.168.1.254
Usable Hosts
254
Total Addresses
256
IP Class
Class CPrivate
Binary Subnet Mask
11111111 . 11111111 . 11111111 . 00000000
■ Network bits (24)■ Host bits (8)

CIDR Reference Table

CIDRSubnet MaskTotal IPsUsable
/00.0.0.04.3e+94.3e+9
/1128.0.0.02.1e+92.1e+9
/2192.0.0.01.1e+91.1e+9
/3224.0.0.0536,870,912536,870,910
/4240.0.0.0268,435,456268,435,454
/5248.0.0.0134,217,728134,217,726
/6252.0.0.067,108,86467,108,862
/7254.0.0.033,554,43233,554,430
/8255.0.0.016,777,21616,777,214
/9255.128.0.08,388,6088,388,606
/10255.192.0.04,194,3044,194,302
/11255.224.0.02,097,1522,097,150
/12255.240.0.01,048,5761,048,574
/13255.248.0.0524,288524,286
/14255.252.0.0262,144262,142
/15255.254.0.0131,072131,070
/16255.255.0.065,53665,534
/17255.255.128.032,76832,766
/18255.255.192.016,38416,382
/19255.255.224.08,1928,190
/20255.255.240.04,0964,094
/21255.255.248.02,0482,046
/22255.255.252.01,0241,022
/23255.255.254.0512510
/24255.255.255.0256254
/25255.255.255.128128126
/26255.255.255.1926462
/27255.255.255.2243230
/28255.255.255.2401614
/29255.255.255.24886
/30255.255.255.25242
/31255.255.255.25422
/32255.255.255.25511

Last updated: March 2026

What Is a Subnet Calculator?

A subnet calculator takes an IPv4 address and a CIDR prefix length (like 192.168.1.0/24) and computes every property of that subnet: network address, broadcast address, subnet mask, wildcard mask, first and last usable host, total addresses, and usable host count.

IPv4 has 4.3 billion possible addresses, and subnetting is how network engineers carve that space into manageable, secure segments. The average enterprise network uses 50 to 200 subnets to separate departments, server VLANs, guest networks, and management interfaces.

How to Use This Subnet Calculator

  1. Enter an IP address — Type any IPv4 address into the input field. You can include the CIDR prefix (e.g. 10.0.0.0/16) or set it separately.
  2. Adjust the CIDR prefix — Use the dropdown or slider to choose a prefix from /0 to /32. Results update in real time as you move the slider.
  3. Read the results — The results table shows network address, broadcast address, masks, host range, usable hosts, IP class, and a color-coded binary representation.
  4. Use the CIDR reference — Click any row in the reference table to instantly switch to that prefix and see its properties.
  5. Try VLSM planning — Switch to the VLSM tab to divide a parent network into multiple subnets of different sizes based on host requirements.

Key Features

Real-time calculation means there is no calculate button to press. Every change to the IP address or CIDR prefix immediately recalculates all results. The binary subnet mask uses color coding to visually distinguish network bits (green) from host bits (blue), making it easy to understand exactly where the subnet boundary falls.

The CIDR reference table lists all 33 possible prefix lengths with their subnet masks, total IPs, usable hosts, and typical use cases. Click any row to instantly select that prefix. The current selection is highlighted so you can easily compare neighboring sizes.

The VLSM planner solves a real-world problem: given a parent network and a list of subnets with different host requirements, it calculates the optimal CIDR for each subnet and allocates non-overlapping address ranges. Subnets are sorted by size (largest first) for the most efficient allocation.

IP class detection identifies whether an address falls in Class A, B, C, D, or E, and flags it as private or public. Copy any result value with a single click.

CIDR Notation Explained

CIDR (Classless Inter-Domain Routing) notation appends a slash and a number to an IP address: 192.168.1.0/24. The number after the slash indicates how many of the 32 bits in the address are used for the network portion. The remaining bits identify individual hosts within that network.

A /24 means 24 network bits and 8 host bits, giving 256 total addresses (254 usable). A /16 means 16 network bits and 16 host bits, giving 65,536 total addresses (65,534 usable). The smaller the prefix number, the larger the network.

Before CIDR, the internet used classful addressing where networks could only be /8 (Class A), /16 (Class B), or /24 (Class C). This led to massive waste — a company needing 300 addresses had to take a full Class B (/16 = 65,534 addresses). CIDR, introduced in 1993, solved this by allowing any prefix length, which significantly slowed the exhaustion of IPv4 addresses.

Related Tools

Frequently Asked Questions

What is subnetting and why does it matter?+
Subnetting divides a larger network into smaller, isolated segments called subnets. Each subnet has its own range of IP addresses. This improves security by limiting broadcast domains, reduces network congestion, and makes IP address allocation more efficient. For example, a company with a /16 network (65,534 hosts) can subnet it into multiple /24 networks (254 hosts each) for different departments.
What is the difference between CIDR and classful addressing?+
Classful addressing (Class A/B/C) uses fixed subnet boundaries: /8, /16, or /24. CIDR (Classless Inter-Domain Routing) allows any prefix length from /0 to /32, enabling much more flexible and efficient IP allocation. For example, if you need 500 hosts, classful addressing wastes a full Class B (/16 = 65,534 hosts), while CIDR lets you use a /23 (510 hosts) — wasting almost nothing.
What are the private IP address ranges?+
RFC 1918 defines three private IP ranges: 10.0.0.0/8 (16.7 million addresses, Class A), 172.16.0.0/12 (1 million addresses, Class B range), and 192.168.0.0/16 (65,536 addresses, Class C range). These addresses are not routable on the public internet and are used for internal networks. Most home routers use 192.168.0.0/24 or 192.168.1.0/24.
What is the difference between network address and broadcast address?+
The network address is the first address in a subnet (all host bits set to 0) and identifies the subnet itself. The broadcast address is the last address (all host bits set to 1) and is used to send data to all hosts on the subnet. Neither can be assigned to a device, which is why a /24 network has 254 usable hosts instead of 256.
What is VLSM and when should I use it?+
Variable Length Subnet Masking (VLSM) allows you to create subnets of different sizes from a single parent network. Use VLSM when your subnets have different host requirements. For example, a server VLAN might need 50 IPs while a point-to-point link only needs 2. VLSM allocates a /26 (62 hosts) for the servers and a /30 (2 hosts) for the link, minimizing wasted addresses.
What is a wildcard mask and where is it used?+
A wildcard mask is the inverse of a subnet mask — where the subnet mask has 1s, the wildcard has 0s, and vice versa. For a /24 subnet, the subnet mask is 255.255.255.0 and the wildcard mask is 0.0.0.255. Wildcard masks are used in Cisco ACLs (access control lists) and OSPF network statements to define which IP addresses to match.