keisoku

IP Address Calculator (Subnet)

Enter an IPv4 address and a prefix length (CIDR) to instantly get the network and broadcast addresses, usable host range and host count, subnet mask, and wildcard mask. The binary representation of each value is listed too.

Input

Prefix length / subnet mask

Result

Class C
Private address
192.168.1.10 / 24

Network address

192.168.1.0/24

Broadcast: 192.168.1.255

Usable hosts

254 hosts

Host range

192.168.1.1 – 192.168.1.254

Wildcard

0.0.0.255

Subnet mask255.255.255.0
Network address192.168.1.0
Broadcast192.168.1.255
First host192.168.1.1
Last host192.168.1.254
Total addresses256 addresses
Wildcard mask0.0.0.255

Binary representation

IP address11000000.10101000.00000001.00001010
Subnet mask11111111.11111111.11111111.00000000
Network11000000.10101000.00000001.00000000
Broadcast11000000.10101000.00000001.11111111

How it works

  • Enter the IP address in a.b.c.d form (each octet 0–255) and pick a prefix length from /0 to /32 (the matching subnet mask is shown alongside) to compute the subnet details instantly.
  • The network address is the bitwise AND of the IP and the subnet mask; the broadcast address is the bitwise OR of the network address and the wildcard mask.
  • The usable host count is the total number of addresses in the block minus the two reserved for the network and broadcast addresses. The first and last host addresses in the range are shown as well.
  • A /31 is treated as point-to-point (2 addresses) and a /32 as a single host, so the host count is shown without subtracting any addresses.
  • The wildcard mask is the bitwise inverse of the subnet mask and is used in access control lists (ACLs) and similar configurations.
  • The address class (A–E) and a private/loopback check for ranges such as 10.x, 172.16–31.x, and 192.168.x are shown for reference. Always confirm the final design in your own environment as well.