Skip to content
MoneyDeck

IP Subnet Calculator

Find network, broadcast, host range and mask for any IPv4 address and CIDR

Updated · Free, no signup

You can include the prefix (e.g. /24) or a dotted mask after a space; it overrides the prefix below.

Must be larger than the network prefix. Set to 0 to skip.

Usable hosts

254

Network (CIDR)

192.168.1.0/24

Network address

192.168.1.0

Broadcast address

192.168.1.255

First usable host

192.168.1.1

Last usable host

192.168.1.254

Total addresses

256

Subnet mask

255.255.255.0

Wildcard mask

0.0.0.255

Mask in binary

11111111.11111111.11111111.00000000

Address class

C

Address type

Private (RFC 1918)
  • Splitting /24 into /26 gives 4 subnets of 62 usable hosts each.

Subnets after splitting

SubnetFirst hostLast hostBroadcastUsable hosts
192.168.1.0/26192.168.1.1192.168.1.62192.168.1.6362
192.168.1.64/26192.168.1.65192.168.1.126192.168.1.12762
192.168.1.128/26192.168.1.129192.168.1.190192.168.1.19162
192.168.1.192/26192.168.1.193192.168.1.254192.168.1.25562

About the IP Subnet Calculator

This IP subnet calculator works out everything about an IPv4 network from a single address and prefix length. Enter an address such as 192.168.1.10 with a /24 prefix — or paste it in CIDR form like 10.20.30.40/20, or with a dotted mask like 192.168.1.10 255.255.255.0 — and it returns the network address, broadcast address, first and last usable host, number of usable hosts, subnet mask, wildcard (inverse) mask and the binary layout of the mask.

Network engineers use it when planning VLANs and VPC ranges, writing firewall rules and ACLs (which often need the wildcard mask), configuring routers, or studying for CCNA and Network+ exams. The split option divides the network into equal smaller subnets and lists each one’s range, which is the core task of subnetting.

Host counts follow standard practice: the network and broadcast addresses are not assignable, so a /24 has 254 usable hosts. Point-to-point /31 links use both addresses (RFC 3021) and a /32 identifies a single host. The tool also flags private, loopback, link-local, CGNAT and documentation ranges.

With the default inputs, the usable hosts is 254. Change any value above to recalculate instantly.

How to use the ip subnet calculator

  1. 1Enter an IPv4 address, optionally with /prefix or a dotted mask.
  2. 2Choose the prefix length if you did not include it.
  3. 3Read the network, broadcast, host range and usable host count.
  4. 4To subnet, set a longer prefix in “Split into subnets” and review the table.

Formula and method

Network = IP AND mask · Broadcast = Network OR wildcard · Usable hosts = 2^(32 − prefix) − 2

An IPv4 address is a 32-bit number. The prefix length (CIDR) says how many leading bits belong to the network; the subnet mask has those bits set to 1 and the rest to 0, and the wildcard mask is its bitwise inverse. A bitwise AND of the address and mask clears the host bits to give the network address, and setting all host bits to 1 (OR with the wildcard) gives the broadcast address.

The block contains 2^(32 − prefix) addresses. The first (network) and last (broadcast) are reserved, so usable hosts are two fewer — except /31, used for point-to-point links where both addresses are usable (RFC 3021), and /32, which is a single host route. Splitting into a longer prefix p creates 2^(p − prefix) equal subnets.

prefix
Number of network bits (the /n in CIDR notation)
mask
prefix ones followed by (32 − prefix) zeros
wildcard
Inverse of the mask (used in Cisco ACLs and OSPF)

Worked examples

Home network 192.168.1.10/24

A /24 leaves 8 host bits, so there are 2^8 = 256 addresses. Removing the network (.0) and broadcast (.255) leaves 254 usable hosts, from 192.168.1.1 to 192.168.1.254. Split into /26, it becomes four subnets of 62 hosts.

Cloud VPC block 10.20.30.40/20

A /20 mask is 255.255.240.0, so the third octet is rounded down to a multiple of 16: 30 → 16. The block runs 10.20.16.0–10.20.31.255, 4,096 addresses with 4,094 usable.

Point-to-point link /30

The dotted mask 255.255.255.252 equals /30: 4 addresses, of which 2 are usable. That is the traditional choice for a router-to-router link, with .5 and .6 on each end.

A /27 inside a documentation range

A /27 block has 32 addresses, so .77 falls in the .64–.95 block. Hosts run .65 to .94 (30 usable). 203.0.113.0/24 is reserved for documentation and examples, so it never appears on the public internet.

Frequently asked questions

How many hosts are in a /24?+

A /24 has 256 addresses and 254 usable hosts, because the network address and broadcast address cannot be assigned. In general, usable hosts = 2^(32 − prefix) − 2, e.g. /26 = 62 and /28 = 14.

What is the difference between a subnet mask and CIDR notation?+

They express the same thing. CIDR counts the network bits (/24); the subnet mask writes those bits in dotted-decimal form (255.255.255.0). /16 = 255.255.0.0 and /27 = 255.255.255.224.

What is a wildcard mask?+

The inverse of the subnet mask — host bits are 1 and network bits are 0. Cisco ACLs and OSPF use it: a /24 has the wildcard 0.0.0.255, meaning “match the first three octets, ignore the last”.

Why can a /31 have two usable hosts?+

RFC 3021 allows /31 networks on point-to-point links, where a broadcast address is not needed. Both addresses are assigned to the two ends, saving address space compared with a /30.

Which IP ranges are private?+

RFC 1918 reserves 10.0.0.0/8, 172.16.0.0/12 and 192.168.0.0/16 for private networks. They are not routed on the public internet and are reached from outside via NAT. 100.64.0.0/10 is reserved for carrier-grade NAT.

Related tools