Skip to content
Free tool

Subnet Calculator for IPv4 & IPv6

Enter an IP address with prefix – for example 192.168.10.25/24 or 2001:db8::/48 – and instantly get the network address, broadcast, usable host range, netmask, wildcard and the number of addresses.

Also possible: "10.0.0.1 255.255.255.0" or an IPv6 address like "2001:db8::/48".

IPv4 · /24

  • Network address192.168.10.0/24
  • Broadcast192.168.10.255
  • First host192.168.10.1
  • Last host192.168.10.254
  • Netmask255.255.255.0
  • Wildcard mask0.0.0.255
  • Total addresses256
  • Usable hosts254
  • Address typePrivate (RFC 1918)

The calculation runs entirely in your browser.

Guide

CIDR and subnets explained

The number after the slash – the CIDR prefix – states how many bits of an address belong to the network. With IPv4 /24 it's 24 of 32 bits: 8 bits remain for hosts, i.e. 256 addresses, of which 254 are usable (the first is the network address, the last the broadcast address).

IPv6 addresses are 128 bits long. A /64 is the usual size for a single network; providers often assign customers a /48 or /56 – enough for thousands of their own /64 networks. IPv6 has no broadcast address.

Common IPv4 prefixes
PrefixNetmaskAddressesUsable hosts
/32255.255.255.25511 (single address)
/31255.255.255.25422 (point-to-point)
/30255.255.255.25242
/29255.255.255.24886
/28255.255.255.2401614
/27255.255.255.2243230
/26255.255.255.1926462
/25255.255.255.128128126
/24255.255.255.0256254
/16255.255.0.065,53665,534

Network address and broadcast

The network address is formed when all host bits are 0, the broadcast address when all host bits are 1. In classic IPv4 networks neither is a host address – the exceptions are /31 and /32.

Private address ranges

10.0.0.0/8, 172.16.0.0/12 and 192.168.0.0/16 are reserved for private networks by RFC 1918 and are not routed on the internet. 100.64.0.0/10 is used by providers for carrier-grade NAT.

Wildcard mask

The wildcard is the inverted netmask (255.255.255.0 becomes 0.0.0.255). Some firewalls and router ACLs use it instead of the netmask.

IPv6: /48, /56 and /64

A /48 contains 65,536 /64 networks, a /56 contains 256. Stateless address autoconfiguration (SLAAC) works within a /64 – which is why smaller networks for end devices are unusual.

Firewall rules on your server

With CIDR ranges you allow whole networks instead of single IPs in UFW or iptables, for example SSH access only from your office network. Our UFW guide shows how.

Planning networks for a VPN

A WireGuard VPN needs its own private subnet that doesn't overlap with your home network – for example 10.8.0.0/24. More in our WireGuard guide.

FAQ

Questions about subnets

How many hosts does a /24 network have?

256 addresses, of which 254 are usable hosts – the first address is the network address, the last the broadcast address.

What does /32 mean?

A /32 describes exactly one single IPv4 address. In firewall rules it stands for a specific host.

What is a wildcard mask?

The bitwise inverted netmask. 255.255.255.0 becomes 0.0.0.255. It is used in router ACLs and some firewalls.

How many /64 networks does an IPv6 /48 contain?

65,536. A /56 contains 256 /64 networks.

Are my inputs stored?

No. The calculation runs entirely in your browser; nothing is sent to our servers.