Skip to content
Free security tool

IP subnet calculator

This IP subnet calculator takes an IPv4 address with a CIDR prefix or a subnet mask and works out the network it belongs to. Network admins, students preparing for networking exams and developers writing firewall rules use it to check address ranges quickly.

  • Runs in your browser
  • Free, no account needed
  • Copy or download the result
Private: runs on this device

Input

16 characters

Result

Network: 192.168.1.128/26
Broadcast: 192.168.1.191
First usable host: 192.168.1.129
Last usable host: 192.168.1.190
Usable hosts: 62
Total addresses: 64
Netmask: 255.255.255.192
Wildcard mask: 0.0.0.63
Binary mask: 11111111.11111111.11111111.11000000
Binary address: 11000000.10101000.00000001.10000010
Note: 192.168.1.130 is a host inside this network, not the network address.
Historical class: C. Classes are no longer used for routing; CIDR prefixes replaced them.
Range: 192.168.0.0/16. Private network (RFC 1918). Not routed on the public internet.

Example

Input
192.168.1.130/26
Result
Network: 192.168.1.128/26
Broadcast: 192.168.1.191
First usable host: 192.168.1.129
Last usable host: 192.168.1.190
Usable hosts: 62
Total addresses: 64
Netmask: 255.255.255.192
Wildcard mask: 0.0.0.63
Binary mask: 11111111.11111111.11111111.11000000
Binary address: 11000000.10101000.00000001.10000010
Note: 192.168.1.130 is a host inside this network, not the network address.
Historical class: C. Classes are no longer used for routing; CIDR prefixes replaced them.
Range: 192.168.0.0/16. Private network (RFC 1918). Not routed on the public internet.

How to use the ip subnet calculator

  1. Type an address and prefix such as 192.168.1.130/26, or an address, a space and a mask such as 10.0.0.1 255.255.255.0, into the IPv4 address with prefix box.
  2. Press Run.
  3. Read the network, broadcast, first and last usable host, host count and masks.
  4. Use Copy result or Download to save the details.

How it works

The network address is the input address with every host bit set to zero, and the broadcast address has every host bit set to one.

Usable hosts are the total addresses minus two, except /31, which gives two usable addresses for point-to-point links under RFC 3021, and /32, which is a single host.

A dotted mask must be ones followed by zeros, such as 255.255.240.0, or it is rejected.

Octets with leading zeros, such as 010, are rejected because some systems read them as octal.

The output also shows the historical address class and whether the address is in a special range such as private RFC 1918 space, loopback or a documentation range.

Everything runs in your browser. Your input is not uploaded or stored.

Questions and answers

How many usable hosts are in a /24?

A /24 has 256 addresses. Two are reserved for the network and broadcast addresses, so 254 can be given to hosts.

Why does a /31 show 2 usable hosts?

RFC 3021 allows /31 networks on point-to-point links, where no broadcast address is needed. Both addresses can be assigned, one to each end of the link.

What is a wildcard mask?

A wildcard mask is the netmask with every bit flipped, such as 0.0.0.255 for 255.255.255.0. Cisco access lists and OSPF settings use it.

Does this work for IPv6?

No. This calculator handles IPv4 only. The IPv6 address expander can expand, compress and show the prefix of IPv6 addresses.

All 220 SnowRock tools