IP/Subnet Calculator

IP/Subnet Calculator

Calculate IP addresses, subnet masks, CIDR prefixes, and network information online

Quick Lookup
Calculation Result
Network Address
-
Broadcast Address
-
Subnet Mask
-
Wildcard Mask
-
First Usable IP
-
Last Usable IP
-
Total Addresses
-
Usable Hosts
-

Mask / CIDR Conversion
-
-

Online calculator for IP addresses, subnet masks, CIDR and network information

IP/Subnet Calculator

The IP/Subnet Calculator is an online network address calculation tool. Enter an IPv4 address and CIDR prefix to quickly calculate the network address, broadcast address, subnet mask, wildcard mask, first usable IP, last usable IP, total addresses and usable hosts. It also supports quick conversion between subnet masks and CIDR prefixes, making it useful for network configuration, server deployment, LAN planning and development troubleshooting.

What can the IP/Subnet Calculator calculate?

After entering an IPv4 address and CIDR prefix, the tool automatically calculates the complete network information based on the network and host portions of the address.

Network Address

The network address identifies the network to which an IP address belongs. It is calculated by performing a bitwise AND operation between the IP address and subnet mask, with all host bits set to 0.

Broadcast Address

The broadcast address is used to send broadcast traffic to all hosts within a subnet. For a standard IPv4 subnet, the broadcast address is usually the last address in the network range.

Subnet Mask

The subnet mask separates the network portion from the host portion of an IPv4 address. For example, the CIDR prefix /24 corresponds to the subnet mask 255.255.255.0.

Wildcard Mask

A wildcard mask, also called an inverse mask, is the bitwise inverse of a subnet mask. It is commonly used in ACLs, routing policies and network device configurations.

Usable IP Address Range

For a standard IPv4 subnet, the tool can calculate the first usable IP and last usable IP to quickly determine the address range available for hosts.

What is CIDR?

CIDR stands for Classless Inter-Domain Routing. It represents the network prefix length after an IP address, such as 192.168.1.0/24. The /24 prefix means that the first 24 bits belong to the network portion and the remaining 8 bits belong to the host portion.

Common CIDR Examples

  • /8: subnet mask 255.0.0.0.
  • /16: subnet mask 255.255.0.0.
  • /24: subnet mask 255.255.255.0.
  • /25: subnet mask 255.255.255.128.
  • /26: subnet mask 255.255.255.192.
  • /27: subnet mask 255.255.255.224.
  • /28: subnet mask 255.255.255.240.

Total Addresses and Usable Hosts

The number of addresses in an IPv4 subnet is determined by the number of host bits. For an IPv4 network with a CIDR prefix of /n, the total number of addresses is normally 2^(32-n).

In a standard subnet, the network address and broadcast address are normally not assigned to hosts, so the number of usable hosts is generally the total number of addresses minus 2. For example, a /24 network contains 256 addresses, of which 254 are normally available for hosts.

Subnet Mask and CIDR Conversion

Convert Subnet Mask to CIDR

Enter a standard IPv4 subnet mask such as 255.255.255.0 and the tool calculates its corresponding CIDR prefix length, which is /24.

Convert CIDR to Subnet Mask

Enter a CIDR prefix such as /24 and the tool quickly calculates the corresponding subnet mask, which is 255.255.255.0.

How to Use the IP/Subnet Calculator

  1. Enter the IPv4 address you want to calculate.
  2. Enter the CIDR prefix length, such as 24.
  3. The tool automatically calculates the current network information.
  4. View the network address, broadcast address, subnet mask and usable IP range.
  5. Use the subnet mask and CIDR conversion feature when needed.

IP/Subnet Calculator Use Cases

  • LAN IP address planning
  • Server and cloud network configuration
  • Router and switch configuration
  • VPC and virtual network planning
  • Firewall and ACL configuration
  • Network development and debugging
  • Subnetting and address range calculation
  • Network operations and troubleshooting

Frequently Asked Questions

How many IP addresses are in 192.168.1.0/24?

192.168.1.0/24 contains 256 IPv4 addresses, ranging from 192.168.1.0 to 192.168.1.255. The network address is 192.168.1.0, the broadcast address is 192.168.1.255, and the standard usable host range is 192.168.1.1 to 192.168.1.254.

What is the subnet mask for /24?

The IPv4 CIDR prefix /24 corresponds to the subnet mask 255.255.255.0. It contains 256 addresses, with 254 normally usable host addresses.

What is the difference between a network address and a broadcast address?

The network address identifies the subnet itself, with all host bits set to 0. The broadcast address represents all hosts in the subnet, with all host bits set to 1. Neither is normally used as a standard host address.

What is a wildcard mask?

A wildcard mask is the bitwise inverse of a subnet mask. For example, the wildcard mask for 255.255.255.0 is 0.0.0.255. It is commonly used in network device ACLs and access control rules.

How IPv4 Subnet Calculation Works

An IPv4 address consists of 32 binary bits. The CIDR prefix specifies how many bits belong to the network portion, while the remaining bits belong to the host portion. The network address is calculated by performing a bitwise AND operation between the IP address and subnet mask. The broadcast address is obtained by setting all host bits of the network address to 1.

What is an IP/Subnet Calculator?

An IP/Subnet Calculator is an online tool for calculating IPv4 network information. Enter an IP address and CIDR prefix to quickly obtain the network address, broadcast address, subnet mask, wildcard mask, first usable IP, last usable IP, total addresses and usable hosts.
  • Calculate complete IPv4 subnet information from an IP address and CIDR prefix, including the network address, broadcast address, subnet mask and usable IP range
  • Calculate the total IPv4 addresses and standard usable host count for LAN, server and VPC network planning
  • Convert between subnet masks and CIDR prefixes, including common formats such as 255.255.255.0 and /24
The IP/Subnet Calculator is useful for network configuration, subnetting, server deployment, routing and ACL configuration, and network development troubleshooting.
Comments 0
No comments yet. Be the first to comment!
Comment content cannot be empty
0/255