IPv4 Subnet Calculator
This calculator derives the network address, broadcast address, host range, and address count for a basic IPv4 CIDR block.
Workspace
What Is the IPv4 Subnet Calculator?
The IPv4 Subnet Calculator splits an IPv4 network into subnets and reports the numbers that matter when you set one up: the subnet mask, the network address, the broadcast address, the usable host range, and how many hosts the subnet can hold. It works from CIDR notation, the /24 in 192.168.1.0/24, which says that the first 24 bits of the 32-bit address identify the network and the remaining 8 bits identify hosts inside it.
Subnetting lets one network be divided into smaller networks so that traffic stays local, addresses are used efficiently, and access rules can be applied per group instead of per device.
How to Use the IPv4 Subnet Calculator
- Enter an IPv4 address in the IPv4 address field (for example
192.168.1.0) and a prefix length from /0 to /32 in the Prefix length (CIDR) field (it starts at 24). - Click Calculate subnet.
- Read the result table: netmask, wildcard mask, network address, broadcast address, first and last usable hosts, total addresses and usable hosts.
- Read the usable host range: everything between the network and broadcast addresses. Those two endpoint addresses cannot be assigned to devices (except for /31 and /32 — see Limitations).
- Check the host count against how many devices the subnet must serve, and choose a larger subnet (smaller prefix number) if it does not fit.
- Apply the mask, gateway, and DNS settings from the result to the devices or router interface on that subnet.
Worked Example
Input: IPv4 address 192.168.1.0, prefix length 24. Observed tool output: netmask 255.255.255.0, wildcard mask 0.0.0.255, network address 192.168.1.0/24, broadcast address 192.168.1.255, first usable host 192.168.1.1, last usable host 192.168.1.254, total addresses 256, usable hosts 254.
Those are the correct results for 192.168.1.0/24: the /24 prefix means the first 24 bits are network bits, giving the mask 255.255.255.0 and 256 total addresses, of which 254 are usable.
Limitations
- Enter the address and prefix in their separate fields: the tool does not accept CIDR notation such as
192.168.1.0/24in a single field. - Usable host count is 2 raised to the host-bit count, minus 2 for the network and broadcast addresses — for prefixes /0 to /30. For /31 the tool reports both addresses as usable (2 hosts, the point-to-point case) and for /32 it reports the single address itself (1 host).
- This page covers IPv4 only. IPv6 uses 128-bit addresses and different subnetting rules.
- The calculator cannot check whether an address is already in use, whether two subnets overlap, or whether a router will accept the range. Overlapping subnets cause routing conflicts even when each one looks valid alone.
- Private ranges (10.0.0.0/8, 172.16.0.0/12, 192.168.0.0/16) are not routable on the public internet, and reserved addresses such as 127.0.0.1 behave specially.
Frequently Asked Questions
What does /24 mean? It means the first 24 of the 32 bits of the IPv4 address identify the network, leaving 8 host bits. That gives the mask 255.255.255.0, 256 total addresses, and 254 usable hosts.
Why did the workspace not calculate my subnet? It should calculate as soon as you click Calculate subnet. If you see an error, check that the address has four numbers from 0 to 255 and the prefix is between 0 and 32.
Why are two addresses unusable in each subnet? The lowest address identifies the network itself and the highest address is the broadcast address that reaches every host on the subnet. Neither can be assigned to a single device in normal use.
How many hosts does a /25 hold? A /25 leaves 7 host bits: 2^7 = 128 total addresses, minus the network and broadcast addresses, giving 126 usable hosts.
Related Tools
From the Blog
How to Split a Bill Fairly (With Tip and Tax, Without the Awkward Maths)
Quick Answer Agree the method before ordering, split the food by what each person ordered, and split tax and tip in proportion…
Read article →How to Use the Pomodoro Technique to Actually Finish Your Work
Most productivity advice tells you what to do and leaves the when to you. That is exactly where the day falls apart.…
Read article →How to Merge PDF Files Into One Document (Without Losing Pages)
You have five PDFs. Your bank wants one file. Your university wants one file. Your client wants one file. Merging them is…
Read article →