IP Calculator
Calculate network details for any IPv4 address. Enter an IP address and CIDR prefix to instantly find the network address, broadcast address, subnet mask, host range, usable hosts, and binary representation. Perfect for network engineers, students, and IT professionals.
What Is an IP Calculator?
An IP Calculator (or subnet calculator) is a tool that computes detailed
information about an IPv4 address and its associated subnet. Given an IP address and a
CIDR prefix (e.g., 192.168.1.100/24), it calculates:
- Network Address: The first address in the subnet.
- Broadcast Address: The last address in the subnet.
- Subnet Mask: The mask that defines the network portion.
- Wildcard Mask: The inverse of the subnet mask.
- Host Range: The range of usable IP addresses.
- Total and Usable Hosts: The number of addresses in the subnet.
- IP Class: The class of the IP address (A, B, C, D, or E).
- Binary Representation: The IP and mask in binary format.
How Does the IP Calculator Work?
The calculator performs the following steps:
Step 1: Convert the IP address to a 32-bit binary number.
Step 2: Generate the subnet mask from the CIDR prefix.
Step 3: Calculate the network address by ANDing the IP with the subnet mask.
Step 4: Calculate the broadcast address by ORing the network address with the inverted subnet mask.
Step 5: Determine the usable host range (network + 1 to broadcast − 1).
Step 6: Calculate the total and usable host counts.
For example: 192.168.1.100/24 → Network: 192.168.1.0,
Broadcast: 192.168.1.255, Host Range: 192.168.1.1 - 192.168.1.254,
Usable Hosts: 254.
Understanding IP Address Classes
- Class A (0.0.0.0 - 127.255.255.255): /8 default mask. Used for large networks.
- Class B (128.0.0.0 - 191.255.255.255): /16 default mask. Used for medium networks.
- Class C (192.0.0.0 - 223.255.255.255): /24 default mask. Used for small networks.
- Class D (224.0.0.0 - 239.255.255.255): Multicast addresses.
- Class E (240.0.0.0 - 255.255.255.255): Reserved for experimental use.
❓ IP Calculator FAQ
What is an IP address?
An IP address (Internet Protocol address) is a unique identifier for a device on a network. IPv4 addresses are 32-bit numbers, typically written as four decimal numbers separated by dots (e.g., 192.168.1.1).
What is CIDR notation?
CIDR (Classless Inter-Domain Routing) notation represents a subnet mask as a slash followed by the number of network bits. For example, /24 means 24 bits are used for the network, leaving 8 bits for hosts (256 addresses).
What is a subnet mask?
A subnet mask is a 32-bit number that separates the network portion of an IP address from the host portion. For example, 255.255.255.0 means the first 24 bits are network bits.
What is the difference between a network address and a broadcast address?
The network address is the first address in a subnet (all host bits are 0). The broadcast address is the last address (all host bits are 1). Neither can be assigned to hosts.
What is a host range?
The host range is the range of IP addresses that can be assigned to devices on the network. It starts at the network address + 1 and ends at the broadcast address − 1.
How many usable hosts are in a subnet?
The number of usable hosts in a subnet is 2h − 2, where h is the number of host bits. The −2 accounts for the network address and the broadcast address, which cannot be assigned to hosts.
What is a wildcard mask?
A wildcard mask is the inverse of a subnet mask. It is used in access control lists (ACLs) to specify which bits to match. For example, the wildcard mask for 255.255.255.0 is 0.0.0.255.
What are private IP addresses?
Private IP addresses are reserved for use within private networks and are not routable on the internet. The ranges are: 10.0.0.0/8, 172.16.0.0/12, and 192.168.0.0/16.
What is the difference between IPv4 and IPv6?
IPv4 uses 32-bit addresses (about 4.3 billion addresses) and is the current standard. IPv6 uses 128-bit addresses (vastly more addresses) and is designed to replace IPv4. This calculator works with IPv4.
What is the purpose of subnetting?
Subnetting divides a large network into smaller, more manageable sub-networks. It improves network performance, enhances security, and conserves IP address space.
What is a /31 subnet?
A /31 subnet has 2 addresses (network and broadcast only) and no usable hosts. It is used for point-to-point links where only two devices are connected. This calculator supports /31 and /32 subnets.
What is a /32 subnet?
A /32 subnet has 1 address (the network address) and no usable hosts. It represents a single host address.
How do I calculate the number of subnets?
The number of subnets depends on how many bits are borrowed from the host portion. This calculator focuses on a single subnet, but you can determine subnets by changing the CIDR prefix.
What is the difference between a subnet and a network?
A network is a larger address space (e.g., 192.168.1.0/24). A subnet is a smaller division of that network. This calculator works at the subnet level.
How do I use this calculator for network planning?
Enter your network's IP address and CIDR prefix to see the network address, broadcast address, host range, and available hosts. This helps you plan IP assignments and understand your network's capacity.
What is the address space visualization?
The address space visualization shows the proportion of the subnet used for the network address, host range, and broadcast address in a visual format.
Is this calculator accurate for all IPv4 addresses?
Yes, this calculator accurately computes network details for any valid IPv4 address and CIDR prefix from /0 to /32.
What is the difference between public and private IP addresses?
Public IP addresses are routable on the internet and are assigned by ISPs. Private IP addresses are used within private networks and are not routable on the internet.