IP Subnet Calculator
Enter an address and a prefix or mask. Every bit below is either network (fixed) or host (assignable) the split moves as you adjust the prefix.
Calculations run entirely in your browser — nothing is sent anywhere. Supports IPv4 CIDR notation (/0–/32) and dotted-decimal subnet masks.
What Is an IP Subnet?
An IP subnet is a smaller network that is formed as a part of a larger network. Each device on the web has an IP address which is composed of two parts: a network segment which indicates which network it is on, and a host segment which indicates which device it is.
Subnetting involves borrowing bits from the host portion to create additional and smaller networks: these can be helpful in managing devices, enhancing security and minimizing wasted IP addresses.
What is CIDR Notation?
The standard way to write an IP address with its network size is to use CIDR (Classless Inter-Domain Routing), which is a slash followed by a number, such as 192.168.1.0/24.
The number following the slash is the prefix length, which indicates the number of bits of the 32-bit IPv4 address that are fixed as the network part. The rest of the bits are reserved for host addresses.
Prefix Length | Subnet Mask | Usable Hosts |
/24 | 255.255.255.0 | 254 |
/25 | 255.255.255.128 | 126 |
/26 | 255.255.255.192 | 62 |
/27 | 255.255.255.224 | 30 |
/28 | 255.255.255.240 | 14 |
/29 | 255.255.255.248 | 6 |
/30 | 255.255.255.252 | 2 |
The smaller the prefix (e.g. /8) the larger the network is, with millions of possible hosts.
The larger the prefix number the smaller the network (e.g. /30 is a very small network, typically used for a point to point link between 2 routers).
How to Use This IP Subnet Calculator
- Enter an IP address: for example, 192.168.1.10.
- Choose a mask format: either CIDR notation (e.g., /24) or a dotted-decimal subnet mask (e.g., 255.255.255.0). Both represent the same thing.
- Read the results: the calculator instantly shows the network address, broadcast address, usable host range, subnet mask, wildcard mask, and total/usable host counts.
- Adjust the prefix slider or field to see how the network and host portions shift in real time, using the 32-bit address map to visualize which bits are network vs. host bits.
Because everything runs client-side in your browser, no IP address you enter is ever transmitted or logged useful if you’re working with internal or sensitive network ranges.
Worked Example: Subnetting 192.168.1.0/24
Say you have the network 192.168.1.0/24 (254 usable hosts) and need to split it into 4 equal subnets for four office departments.
- Borrow 2 bits from the host portion to move from /24 to /26.
- This creates 4 subnets, each with 64 addresses (62 usable hosts):
- 192.168.1.0/26 → hosts 192.168.1.1–192.168.1.62
- 192.168.1.64/26 → hosts 192.168.1.65–192.168.1.126
- 192.168.1.128/26 → hosts 192.168.1.129–192.168.1.190
- 192.168.1.192/26 → hosts 192.168.1.193–192.168.1.254
Plug any of these into the calculator above to confirm the network address, broadcast address, and usable range instantly.
Network Address vs. Broadcast Address vs. Usable Hosts
- Network address: the first address in a subnet, used to identify the network itself not assignable to a device.
- Broadcast address: the last address in a subnet, used to send data to every device on that subnet also not assignable.
- Usable hosts: every address between the network and broadcast address, available to assign to devices. This is why a /24 has 256 total addresses but only 254 usable ones.
FAQ Section
Q1: What is a subnet mask used for?
Ans: A subnet mask tells devices which portion of an IP address is the network part and which part identifies the individual host.
It’s used alongside the IP address to determine whether two devices are on the same local network or need to be routed elsewhere.
Q2: What does /24 mean in an IP address?
Ans: /24 is CIDR notation meaning the first 24 bits of the 32-bit IPv4 address are the network portion, leaving 8 bits for hosts.
This corresponds to a subnet mask of 255.255.255.0 and yields 254 usable host addresses.
Q3: How many usable hosts are in a /27 subnet?
Ans: A /27 subnet has 32 total addresses, with 30 usable for hosts after subtracting the network and broadcast addresses.
Q4: What’s the difference between CIDR notation and a subnet mask?
Ans:They represent the same information in different formats. CIDR notation (/24) is a shorthand prefix length, while a subnet mask (255.255.255.0) writes the same value out in dotted-decimal form. Either can be converted into the other.
Q5: Why do I lose 2 addresses in every subnet?
Ans: The first address in any subnet is reserved as the network address, and the last is reserved as the broadcast address.
Neither can be assigned to a device, which is why usable hosts = total addresses 2 (except for /31 and /32, which follow special rules for point-to-point links and single hosts).
Q6: Is this IP subnet calculator safe to use for private or internal IP ranges?
Yes, all calculations happen locally in your browser using JavaScript. No IP address or subnet data you enter is sent to a server or stored.
Q7: Does this tool support IPv6?
Currently this calculator supports IPv4 CIDR notation (/0–/32) and dotted-decimal subnet masks. (Remove this line once/if IPv6 support is added.)