IP Subnet Calculator

An IP subnet calculator divides networks into smaller segments using CIDR notation. 192.168.1.0/24 means the first 24 bits are the network, giving subnet mask 255.255.255.0 and 254 usable hosts (2^8 - 2). The network address (all host bits 0) and broadcast address (all host bits 1) cannot be assigned to hosts. Wildcard mask = 255.255.255.255 minus subnet mask.

Calculate IP subnet details from any IPv4 address and CIDR notation. Shows network address, broadcast, host range, usable hosts, wildcard mask, and binary representation. Includes CIDR reference table.

Works OfflineDark ModeNo Ads

Presets

IP Address

/
/0/8/16/24/32

Subnet Details

Network Address192.168.1.0
Broadcast Address192.168.1.255
Subnet Mask255.255.255.0
Wildcard Mask0.0.0.255
First Host192.168.1.1
Last Host192.168.1.254
Total Addresses256
Usable Hosts254
IP ClassC
IP TypePrivate (192.168.0.0/16)

Binary Representation

Subnet Mask:11111111.11111111.11111111.00000000
Network:11000000.10101000.00000001.00000000

CIDR Notation

192.168.1.0/24

Common CIDR Subnets

CIDRSubnet MaskUsable HostsUse Case
/32255.255.255.2551Single host
/30255.255.255.2522Point-to-point link
/28255.255.255.24014Small office
/24255.255.255.0254Home / office LAN
/20255.255.240.04,094Medium network
/16255.255.0.065,534Large campus
/12255.240.0.01,048,574Private (172.16/12)
/8255.0.0.016,777,214Class A / Private (10/8)

How to Use

  1. 1

    Enter IP address

    Type an IPv4 address (e.g., 192.168.1.0) or click a preset (Home /24, Small Office /28, Point-to-Point /30, Class B /16).

  2. 2

    Set CIDR prefix

    Type a CIDR value (0-32) or use the slider. /24 = 254 hosts, /28 = 14 hosts, /30 = 2 hosts.

  3. 3

    Review subnet details

    See network address, broadcast address, host range, usable hosts, subnet mask, wildcard mask, IP class, and type (public/private).

  4. 4

    Copy results

    Click the copy button to copy all subnet details as formatted text for documentation or network configuration.

Frequently Asked Questions

What is a subnet and why do I need one?
A subnet (subnetwork) divides a larger network into smaller, logical segments. Subnetting improves security (isolating network segments), reduces broadcast traffic, and enables efficient IP address allocation. For example, a /24 subnet gives 254 usable hosts, perfect for a typical office LAN.
What is CIDR notation?
CIDR (Classless Inter-Domain Routing) notation expresses an IP address and its subnet mask as IP/prefix. The prefix number (0-32) indicates how many bits are used for the network portion. 192.168.1.0/24 means the first 24 bits are the network (255.255.255.0 mask), leaving 8 bits for 256 addresses (254 usable hosts).
How do I calculate the number of usable hosts?
Usable hosts = 2^(32 - CIDR prefix) - 2. Subtract 2 because one address is the network address and one is the broadcast address. A /24 has 2^8 - 2 = 254 usable hosts. A /28 has 2^4 - 2 = 14 usable hosts. A /30 has 2 usable hosts (point-to-point links). A /31 is special: 2 hosts, no broadcast (RFC 3021).
What is the difference between subnet mask and wildcard mask?
A subnet mask marks network bits with 1s and host bits with 0s (e.g., 255.255.255.0). A wildcard mask is the inverse: host bits are 1s and network bits are 0s (e.g., 0.0.0.255). Wildcard masks are used in Cisco ACLs and OSPF configurations. To convert: wildcard = 255.255.255.255 - subnet mask.
What are private IP address ranges?
RFC 1918 defines three private ranges: 10.0.0.0/8 (16.7M addresses, Class A), 172.16.0.0/12 (1M addresses, Class B), and 192.168.0.0/16 (65K addresses, Class C). These 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 = 0) and identifies the subnet itself. The broadcast address is the last address (all host bits = 1) and sends packets to all hosts in the subnet. Neither can be assigned to a host. In 192.168.1.0/24: network = 192.168.1.0, broadcast = 192.168.1.255.

Related Tools