IPv4 subnet calculator

Enter an IP address and a CIDR prefix to get every parameter of the subnet, from the network address to the host count.

For example 192.168.1.10 or 192.168.1.10/24

Network address
192.168.1.0
Broadcast address
192.168.1.255
Subnet mask
255.255.255.0
Wildcard mask
0.0.0.255
First host
192.168.1.1
Last host
192.168.1.254
Usable hosts
254
Total addresses
256
CIDR notation
192.168.1.0/24

Runs in your browser. Nothing you enter is sent to our server.

About this tool

A subnet is a block of consecutive IPv4 addresses that share the same leading bits. The prefix says how many: in a /24 the first 24 bits are the network and the remaining 8 identify hosts, giving 256 addresses.

The calculator shows everything you need to configure a router, server or ACL: the subnet mask and wildcard mask (used in Cisco ACLs and OSPF), the range boundaries and the number of addresses available for devices.

How to use

  1. Enter any IP address from the subnet, for example 10.20.30.40.
  2. Choose the prefix. Pasting 10.20.30.40/22 sets the prefix automatically.
  3. Copy the values you need from the result.

Examples

Input
10.20.30.40/22
Result
Network 10.20.28.0, broadcast 10.20.31.255, mask 255.255.252.0, wildcard 0.0.3.255, 1022 hosts
Input
192.168.0.130/26
Result
Network 192.168.0.128, hosts 192.168.0.129–192.168.0.190 (62), broadcast 192.168.0.191

Frequently asked questions

What is a wildcard mask?

It is the subnet mask inverted: ones where the mask has zeros. For /24 the mask is 255.255.255.0 and the wildcard is 0.0.0.255.

Why does /31 have two hosts and no broadcast?

RFC 3021 defines /31 for point-to-point links: both addresses are assigned to devices and no broadcast address is needed.

How do I pick a subnet size?

Count your devices, add headroom and choose the smallest prefix whose usable host count covers it. For 50 devices a /26 (62 hosts) works.