Skip to content
Free tool · Web & network

IPv4 & IPv6 Subnet Calculator

Calculate any IPv4 or IPv6 subnet from CIDR notation or a netmask: network and broadcast address, usable host range, netmask and wildcard, number of addresses and /64 networks, the address type, a colour-coded binary view and an even split into smaller subnets.

Runs in your browser — nothing is uploadedNo sign-up · no tracking of your input

Network

Examples:

IPv4 subnet

Network
192.168.1.0/24
Broadcast
192.168.1.255
Usable host range
192.168.1.1 – 192.168.1.254
Usable hosts
254
Total addresses
256 (2^8)
Netmask
255.255.255.0
Wildcard mask
0.0.0.255Used in Cisco ACLs and OSPF
Prefix length
/24
Address type
Private (RFC 1918)
Historic class
CClasses are obsolete since CIDR (1993); shown for reference
Hex / integer
0xc0a8010a · 3232235786

Binary view

Network bits (first 24) and host bits (last 8).

Address
11000000101010000000000100001010
Netmask
11111111111111111111111100000000

Split into subnets

4 subnets of /26, each with 64 addresses (62 usable hosts).

#SubnetHosts
1192.168.1.0/26192.168.1.1 – 192.168.1.62
2192.168.1.64/26192.168.1.65 – 192.168.1.126
3192.168.1.128/26192.168.1.129 – 192.168.1.190
4192.168.1.192/26192.168.1.193 – 192.168.1.254

How to use the IPv4 & IPv6 Subnet Calculator

  1. 1

    Enter a network

    Type an address with prefix such as 192.168.1.10/24 or 2001:db8::/48. For IPv4 you can also write the netmask, for example 10.1.2.3 255.255.240.0.

  2. 2

    Read the results

    See the network, host range, masks, address count and whether the range is private, CGNAT, documentation, link-local or public.

  3. 3

    Split the network

    Choose a longer prefix to divide the network into equal subnets, for example a /24 into four /26 or a /48 into /64 LANs.

Background reading

The background, explained in depth

FAQ

IPv4 & IPv6 Subnet Calculator: frequently asked questions

How many usable hosts does a /24 have?

254. A /24 has 256 addresses; the first is the network address and the last the broadcast address, so 254 remain for hosts. In general an IPv4 network has 2^(32 − prefix) − 2 usable hosts.

Why does a /31 have two usable hosts?

RFC 3021 allows /31 networks on point-to-point links: with only two addresses there is no need for a network or broadcast address, so both can be assigned. A /32 describes a single host.

What is a wildcard mask?

The inverse of the netmask: 255.255.255.0 becomes 0.0.0.255. Cisco access lists and OSPF use it to say which bits of an address must match (0) and which may vary (1).

How big is an IPv6 /48 or /56?

A /48 contains 65,536 networks of size /64, a /56 contains 256. Each /64 is the standard size of one IPv6 LAN, because stateless address autoconfiguration (SLAAC) needs 64 bits for the interface identifier.

Which IPv4 ranges are private?

10.0.0.0/8, 172.16.0.0/12 and 192.168.0.0/16 (RFC 1918). 100.64.0.0/10 is shared address space for carrier-grade NAT, 169.254.0.0/16 is link-local, and 192.0.2.0/24, 198.51.100.0/24 and 203.0.113.0/24 are reserved for documentation.