Skip to content
UniKit

IPv4 Subnet & Netmask Calculator

Turn an IPv4/CIDR into network address, netmask, wildcard, broadcast, usable host range and count, plus a private/CGNAT/loopback/multicast scope check.

Runs in your browserEvery computation happens in your browser — your data never leaves this device.

IPv4 address / CIDR

A /n suffix sets the mask length; when the address has no suffix the "default mask length" below is used. Host bits are normalised to the containing network.

Subnet result

/31 and /32 have no usable hosts, so the host range shows as "-".

Enter an IPv4 address to see the result

What this tool does

  • Confirm the network address, broadcast address and usable host range of 192.168.1.42/24 before configuring a router or firewall
  • Work out how many devices a subnet can hold (for example a /30 fits exactly two)
  • Check whether an address such as 100.64.x.x, 169.254.x.x or 224.x.x.x is CGNAT, link-local or multicast

Example

Input

192.168.1.42/24

Output

network: 192.168.1.0/24
netmask: 255.255.255.0
wildcard: 0.0.0.255
broadcast: 192.168.1.255
host range: 192.168.1.1 - 192.168.1.254
usable hosts: 254
total addresses: 256
ip class: C
scope: private (RFC 1918)

The output lists network address, netmask, wildcard, broadcast, usable host range and count, total addresses, classful class and address scope.

Frequently asked questions

Why is the usable host count 0 for /31 and /32?

The classic rule reserves the network and broadcast addresses, so /31 (two addresses) and /32 (one address) leave no usable hosts. RFC 3021 allows both addresses of a /31 point-to-point link to be used; this tool does not apply that special case and shows the host range as "-".

Which rules decide the "scope"?

Public definitions such as RFC 6890 (special-purpose addresses), RFC 1918 (private), RFC 6598 (CGNAT 100.64/10) and RFC 5737 (TEST-NET). A range is only labelled when it fits entirely inside a special block — 10.0.0.0/7 crosses out of 10/8 and is therefore reported as public.

Are classful classes (A/B/C/D/E) still relevant?

They are the historic first-octet split (A ≤ 127, B ≤ 191, C ≤ 223, D multicast, E reserved). Modern networks use CIDR masks; the class is kept here only for cross-checking older documentation.

Is IPv6 supported?

No, this tool handles IPv4 only. Leading zeros such as 01.2.3.4 are rejected to avoid confusion with octal notation.

Does it probe the address?

No. Everything is calculated offline: no ping and no API requests.

Keywords:subnet calculatornetmask calculatorcidripv4 subnet

Related tools