IPv4 Subnet Calculator: Network, Broadcast, Host Range and Subnetting

How the subnet calculator works: the prefix length says how many bits belong to the network. 192.168.1.10/24 is in network 192.168.1.0 with broadcast 192.168.1.255 and 254 usable hosts. Enter an IP and prefix (or “10.0.0.5/20”) – everything runs locally in your browser.

Source: RFC 4632, RFC 4632 – Classless Inter-domain Routing (CIDR): prefix notation. Updated: .

a /prefix in the address overrides the selector
choose a new, longer prefix
My ToolboxYour inputs are saved in this browser only.

Result

Network
192.168.1.0/24 · 254 usable hosts
Network details
ItemValue
Network address192.168.1.0/24
Subnet mask255.255.255.0
Wildcard mask0.0.0.255
Broadcast address192.168.1.255
Usable host range192.168.1.1 – 192.168.1.254
Usable hosts254
Total addresses256
Address typeprivate (RFC 1918)
Class (historic)Class C
Binary (working)
binary
IP address11000000.10101000.00000001.00001010
Subnet mask11111111.11111111.11111111.00000000
Network address11000000.10101000.00000001.00000000
Subnets
No.SubnetHost rangeBroadcast
1192.168.1.0/26192.168.1.1 – 192.168.1.62192.168.1.63
2192.168.1.64/26192.168.1.65 – 192.168.1.126192.168.1.127
3192.168.1.128/26192.168.1.129 – 192.168.1.190192.168.1.191
4192.168.1.192/26192.168.1.193 – 192.168.1.254192.168.1.255

How it is calculated

How subnet calculation works

An IPv4 address has 32 bits. The prefix length (CIDR notation, RFC 4632) tells how many bits from the left identify the network; the remaining bits number the hosts.

Example: 192.168.1.10/26

  1. Mask /26 = 11111111.11111111.11111111.11000000 = 255.255.255.192
  2. Last octet: 10 = 00001010, AND 11000000 = 00000000 → network 192.168.1.0
  3. Host bits set to 1: 00111111 = 63 → broadcast 192.168.1.63
  4. Hosts: 2⁶ − 2 = 62, range 192.168.1.1 – 192.168.1.62

Subnet cheat sheet

PrefixMaskHosts
/8255.0.0.016,777,214
/16255.255.0.065,534
/24255.255.255.0254
/25255.255.255.128126
/26255.255.255.19262
/27255.255.255.22430
/28255.255.255.24014
/29255.255.255.2486
/30255.255.255.2522

Private and special ranges

RFC 1918 reserves 10.0.0.0/8, 172.16.0.0/12 and 192.168.0.0/16 for private networks. Other special-purpose blocks (loopback 127.0.0.0/8, link-local 169.254.0.0/16, carrier-grade NAT 100.64.0.0/10) are listed in the IANA registry defined by RFC 6890. The calculator tells you which range an address falls into.

Subnetting

“Split into subnets” divides the network into equal parts with a longer prefix: a /24 split into /26 gives four networks of 62 hosts (.0, .64, .128, .192). Every extra bit doubles the number of subnets and halves their size.

Frequently asked questions

How do you calculate the network address?

Bitwise AND the IP address with the subnet mask. 192.168.1.130 with 255.255.255.192: 130 AND 192 = 128 → network 192.168.1.128.

How many hosts are in a /27?

2⁵ − 2 = 30 usable hosts out of 32 addresses; the mask is 255.255.255.224.

How many hosts are in a /29?

2³ − 2 = 6 usable hosts out of 8 addresses; mask 255.255.255.248.

What is a broadcast address?

The last address of a subnet, with all host bits set to 1. Packets sent there reach every device in the subnet; it cannot be assigned to a host.

What is a wildcard mask?

The inverted subnet mask, e.g. 0.0.0.255 for /24, used in Cisco ACLs and OSPF network statements.

Does it support IPv6?

No – this calculator is for IPv4. IPv6 subnets are usually /64; the prefix logic is the same but with 128 bits.

Sources and legal basis

As of: · Editorial policy

Related tools