🌐

Subnet Calculator

Enter an IPv4 address and CIDR prefix to instantly calculate network address, broadcast address, usable host range, subnet mask, wildcard mask and IP class.

IPv4 Subnet Calculator
IP Address
CIDR Prefix
Please enter a valid IPv4 address (e.g. 192.168.1.0)
Subnet Summary
Network Address
Broadcast Address
Usable Hosts
IP Class
NETWORK
USABLE HOSTS
BROADCAST
Network address
Usable host range
Broadcast address
Full Details
IP Address
Network Address
Subnet Mask
Wildcard Mask (Cisco ACL)
Broadcast Address
First Usable Host
Last Usable Host
Total Addresses
Usable Host Addresses
CIDR Notation
IP Class
Private Range
Binary Subnet Mask
CIDR Quick Reference
CIDRSubnet MaskWildcardTotal IPsUsable HostsCommon Use

Click any row to calculate that CIDR using your entered IP address.

About the Subnet Calculator

Subnetting is the process of dividing a larger IP network into smaller, more manageable segments. Every IPv4 address consists of a network portion and a host portion. The CIDR prefix (the number after the slash) tells you how many bits belong to the network. A /24 means 24 bits are the network, leaving 8 bits for hosts, giving 256 addresses (254 usable after reserving the network and broadcast addresses).

This calculator takes any IPv4 address and CIDR prefix and instantly computes all the values you need: the network address (the first address in the subnet), broadcast address (the last), first and last usable host addresses, subnet mask in dotted decimal, wildcard mask for Cisco ACLs, total address count and usable host count. The binary subnet mask display shows exactly which bits are network bits (1s) and which are host bits (0s), which is essential for understanding subnetting rather than just copying numbers.

Worked Examples

Common /24 network
Input: 192.168.1.0/24 Network: 192.168.1.0 Broadcast: 192.168.1.255 First host: 192.168.1.1 Last host: 192.168.1.254 Hosts: 254 usable
Small WAN link /30
Input: 10.0.0.0/30 Network: 10.0.0.0 Broadcast: 10.0.0.3 Hosts: 2 usable (point-to-point) Wildcard: 0.0.0.3
How do I find the network address from an IP?
Apply a bitwise AND between the IP address and the subnet mask. For 192.168.1.100 with mask 255.255.255.0, each octet: 192 AND 255=192, 168 AND 255=168, 1 AND 255=1, 100 AND 0=0. Network address is 192.168.1.0.
What is the wildcard mask used for?
Wildcard masks are used in Cisco ACLs and OSPF network statements. They are the bitwise inverse of the subnet mask. A /24 subnet mask 255.255.255.0 has wildcard 0.0.0.255. A wildcard bit of 0 means the ACL must match that bit, and 1 means ignore it.
Why are there only 254 usable hosts in a /24?
Two addresses are reserved in every subnet. The first address is the network address (identifies the subnet) and the last is the broadcast address (sends to all hosts). All addresses between them are usable for hosts.

Common Use Cases

  • 🌐
    Network design and planning. Calculate the right subnet size for each network segment before configuring routers and switches. Use the host count to pick the smallest subnet that fits your requirements.
  • 🔒
    Cisco ACL configuration. Get the correct wildcard mask for any subnet to use in access-list statements without manual binary arithmetic under pressure.
  • 🎓
    CCNA and CCNP study. Subnetting is tested extensively in Cisco certification exams. Use the binary mask display to understand the underlying bit operations, not just memorise the answers.
  • 🔍
    Troubleshooting connectivity. Verify that two IP addresses are in the same subnet by calculating both network addresses and checking they match.
  • 📋
    Documentation. Generate complete subnet details for network documentation, IP address management (IPAM) records and change request forms.