A subnet calculation starts with network bits
An IPv4 subnet uses a 32-bit address split into network bits and host bits. The CIDR prefix tells how many bits belong to the network. A slash 24 prefix means the first 24 bits identify the network and the remaining 8 bits identify host positions inside that subnet.
The calculator can show the network address, broadcast address, mask, range, and host count. Each output comes from the same bit boundary, so the prefix must be entered correctly before any range result is useful.
Each octet must stay between zero and two hundred fifty five
An IPv4 address has four octets. Each octet is a decimal version of eight binary bits, so the valid range is 0 through 255. An address with 300 in an octet is not a valid IPv4 address, even if the rest of the string looks normal.
If the calculation is being checked by hand, the Binary Calculator can help convert octets into bit patterns. Subnetting is easier to understand when the decimal address is tied back to binary positions.
CIDR prefix length controls subnet size
A shorter prefix leaves more host bits and creates a larger subnet. A longer prefix leaves fewer host bits and creates a smaller subnet. For example, slash 24 has 8 host bits, while slash 30 has only 2 host bits.
That size difference affects address planning. A subnet that is too small will not fit the needed devices. A subnet that is too large may waste address space or make network boundaries harder to manage.
The network address identifies the block
The network address is the first address in the subnet block. It is found by setting the host bits to zero. Devices do not usually use that address as a normal host address in traditional IPv4 subnetting because it names the subnet itself.
When documenting a subnet, the network address and prefix are often written together, such as 192.168.1.0/24. That notation identifies the whole block rather than one device.
The broadcast address is the top end of the block
The broadcast address is found by setting all host bits to one. In traditional IPv4 networks, it is reserved for broadcast traffic within the subnet and is not assigned to a standard host.
The usable host range usually sits between the network address and broadcast address. Point-to-point links and special designs can use different rules, so the network policy still matters.
Subnet masks are another way to show the prefix
A subnet mask such as 255.255.255.0 represents the same boundary as a CIDR prefix such as slash 24. The mask shows which bits are network bits by using ones in those positions. CIDR notation is shorter, while dotted masks are common in device interfaces.
Converting between the two is a frequent networking task. If a device asks for a mask instead of a prefix, copy the mask from the subnet result rather than guessing.
Host count is based on remaining host bits
The total address count is 2 raised to the number of host bits. Traditional usable host count subtracts 2 for the network and broadcast addresses. A slash 24 has 256 total addresses and usually 254 usable host addresses.
Very small subnets can have special rules. For slash 31 point-to-point links, modern networks may treat both addresses differently than the older subtract-two rule. Confirm the rule used by the environment.
Private and public ranges should not be confused
Private IPv4 ranges such as 10.0.0.0/8, 172.16.0.0/12, and 192.168.0.0/16 are meant for internal networks. Public addresses route on the internet. A subnet calculation can work for either type, but the routing meaning is different.
Before assigning addresses, check whether the block is private, public, reserved, or already used elsewhere in the network plan.
Hexadecimal appears in networking but not most IPv4 forms
IPv4 subnetting is usually shown in decimal octets and binary masks. Hexadecimal appears more often in packet analysis, MAC addresses, and IPv6 notation. If a networking task moves into base-16 values, the Hex Calculator can help with that representation.
For ordinary IPv4 subnet planning, keep the address, mask, prefix, host range, and usable count together. Those fields are the pieces most likely to be needed in a router, firewall, or documentation table.