🌐

Subnet Calculator

Enter an IP address with CIDR notation to calculate network address, broadcast, subnet mask, host range, and more.

Enter an IPv4 address with CIDR prefix (e.g., 10.0.0.0/8, 172.16.5.10/20)

Subnet Information

About the Subnet Calculator

The Oneyfy Subnet Calculator is an essential tool for network administrators, IT professionals, and students learning about TCP/IP networking. Enter any IPv4 address with a CIDR prefix length and instantly get all subnet details.

How to Use

  1. Enter an IPv4 address followed by a slash and the prefix length, e.g., 192.168.1.0/24.
  2. Optionally check Show binary representation to see addresses in binary.
  3. Click Calculate.

How It Works

The CIDR prefix (e.g., /24) defines how many bits are the network portion of the address. The remaining bits define hosts.

Subnet Mask: first /N bits are 1, remaining bits are 0.
Network Address: IP AND subnet mask.
Broadcast: Network address OR (inverse of subnet mask).
Usable hosts: 2^(32−N) − 2 (subtract network and broadcast addresses).

Example

192.168.1.0/24: Subnet mask 255.255.255.0, Network 192.168.1.0, Broadcast 192.168.1.255, First host 192.168.1.1, Last host 192.168.1.254, Usable hosts: 254.

Frequently Asked Questions

/24 means 24 bits are used for the network portion, leaving 8 bits for hosts. This gives 256 addresses (254 usable), with subnet mask 255.255.255.0.
The wildcard mask is the inverse of the subnet mask. It is used in access control lists (ACLs) and OSPF configurations. For mask 255.255.255.0, the wildcard is 0.0.0.255.
The first address (all host bits = 0) is the network address and cannot be assigned to a host. The last address (all host bits = 1) is the broadcast address. Both are reserved.
Currently, this calculator supports IPv4 only. IPv6 support may be added in a future update.