IPv4 Subnet Calculator

Enter an IPv4 address with a CIDR prefix or a dotted-decimal mask and get the network address, broadcast address, usable host range, host count, and binary breakdown.

FreeOnline Tool
Loading…

How to Use

  1. Type an IP address into the input box, for example 192.168.1.100.
  2. Enter the CIDR prefix length, such as 24, or the subnet mask, such as 255.255.255.0.
  3. Click the "Calculate" button.
  4. Read the results: network address, broadcast address, subnet mask, number of usable hosts, and the IP range.

Features

  • Calculates the network address, broadcast address, and subnet mask.
  • Shows the usable host range, from the first address to the last.
  • Reports how many hosts the subnet can hold.
  • Accepts either CIDR notation (/24) or a dotted-decimal mask.
  • Displays the binary form of the address so the split between network and host bits is obvious.

Use Cases

Planning a corporate network
Work out how many addresses each department needs, then carve the space into subnets and produce a clean allocation plan.
Configuring cloud VPC subnets
When setting up a VPC on AWS, Alibaba Cloud, or similar, pick CIDR blocks that fit your capacity needs without overlapping existing ranges.
Learning and checking your work
Students and engineers studying subnetting can verify hand calculations and build a clearer picture of how host and network bits interact.
Writing firewall rules
Get the exact address range you need to allow or deny before writing an ACL or security group rule, so the policy matches your intent.

FAQ

What is CIDR notation?
CIDR writes a network as an address followed by a slash and a prefix length. 192.168.1.0/24 means the first 24 bits are the network portion, which equals mask 255.255.255.0 and leaves room for 254 hosts.
What is the difference between a /24 and a /25?
A /24 gives you 254 usable host addresses. A /25 splits that same block in half, so each half holds 126 usable hosts. Every extra prefix bit halves the hosts and doubles the number of subnets.
Why is the usable host count two less than the total?
The first address in a subnet is the network address and the last one is the broadcast address. Neither can be assigned to a host.
Which address ranges are private?
RFC 1918 reserves three blocks: 10.0.0.0/8, 172.16.0.0/12, and 192.168.0.0/16. These are for internal networks only and are never routed on the public internet.