Subnet Calculator

Calculate CIDR ranges, subnet masks, IP ranges, and usable hosts. Enter an IP with CIDR or subnet mask.

Prefix Length /24
Network Address
Broadcast Address
First Usable Host
Last Usable Host
Subnet Mask
Wildcard Mask
Total Addresses
Usable Hosts
IP Type
CIDR Notation
Binary Representation
IP Address
Subnet Mask
Network

CIDR Quick Reference

CIDRSubnet MaskAddressesUsable HostsWildcard

Need IP Geolocation in Your App?

Get country, city, ISP, and coordinates for any IP address. Free API, no signup.

curl https://agent-gateway-kappa.vercel.app/api/geo/8.8.8.8 Get Free API Key

Frequently Asked Questions

What is CIDR notation?
CIDR (Classless Inter-Domain Routing) notation combines an IP address with a prefix length. For example, 192.168.1.0/24 means a network where the first 24 bits are the network part, giving 256 addresses (2^8). The prefix length after the slash tells you how many bits identify the network.
How do I calculate usable hosts?
Total addresses = 2^(32 - prefix). Usable hosts = total - 2 (subtract network address and broadcast address). Exception: /31 has 2 usable hosts (point-to-point links per RFC 3021), and /32 has 1 (single host).
What is a wildcard mask?
A wildcard mask is the bitwise inverse of a subnet mask. Used in Cisco ACLs and OSPF configs. For /24 (mask 255.255.255.0), the wildcard is 0.0.0.255. Wildcard bits set to 1 mean "match any value" for that bit position.
What are RFC 1918 private address ranges?
Private (non-routable) ranges: 10.0.0.0/8 (16M addresses), 172.16.0.0/12 (1M addresses), 192.168.0.0/16 (65K addresses). These are used for internal networks and cannot be routed on the public internet.