Ihsabha
AREN
IhsabhaTechnology & Internet › Subnet Calculator

🌐 Subnet Calculator

Calculate network address, broadcast address, usable host range, subnet mask, and number of hosts from any IPv4 address and CIDR prefix.

📂 Technology & Internet
🛡️ Reviewed by: Ihsabha Editorial Team · Method: Native browser JavaScript only — pure IPv4 bitwise arithmetic for subnetting (network/broadcast address, usable host range, and CIDR mask calculations) — no external libraries, no server, and no data ever leaves your browser · Last updated: August 1, 2026
🔒 Privacy note: Everything on this page runs entirely inside your browser using client-side JavaScript. Nothing you type is ever uploaded, logged, or sent to any server.

How to use this tool

Fill in the fields on the left, then press the button to see your result instantly. Everything runs locally in your browser — no sign-up required, and no data is ever sent anywhere.

About this tool

The Subnet Calculator analyzes any IPv4 address with a CIDR prefix (such as 192.168.1.10/24) and extracts all its related information at once: the subnet mask, the wildcard mask, the network address itself, the broadcast address, and the range of addresses actually usable by devices within that network. The calculation works entirely through bitwise operations on the 32-bit numbers that make up an IPv4 address, which is the same logic used in real computer network design when dividing a large network into smaller subnets (subnetting) to distribute IP addresses efficiently across different departments or devices. Two edge cases receive special handling: a /31 prefix, used for point-to-point links where both addresses are usable with no separate broadcast address, and a /32 prefix, which identifies a single host with no network or broadcast address at all. Understanding CIDR notation is also essential for reading firewall rules and routing tables correctly, since a misread prefix length can make a rule apply to a far larger or smaller range of addresses than intended.

Subnetting Explained: Splitting One Network Into Many

Every device on an IPv4 network needs an address, but simply handing out addresses one at a time from a single enormous pool quickly becomes unmanageable — routing traffic, applying security policies, and organizing a growing network all become far easier once that address space is deliberately divided into smaller, purpose-built subnets. Subnetting is the technique that makes this division possible, and the CIDR prefix (the '/24' in an address like 192.168.1.10/24) is the shorthand notation that describes exactly how the division was made.

The CIDR number states how many of the address's 32 bits are reserved for identifying the network itself, leaving the remaining bits to identify individual hosts within that network. A /24 prefix reserves 24 bits for the network, leaving 8 bits for hosts — enough for 256 total addresses, though 2 are reserved (the network address and the broadcast address), leaving 254 usable addresses for actual devices. A /26 prefix instead reserves 26 bits for the network, leaving only 6 for hosts — just 64 total addresses, and only 62 usable, but four times as many separate subnets can be carved out of the same original address block.

This tradeoff — more usable addresses per subnet versus more total subnets — is the core design decision every network administrator makes when subnetting a network. A small branch office with 20 employees does not need, and would waste, a /24 subnet with 254 available addresses; a /27 prefix (30 usable addresses) fits its needs far more efficiently, freeing the remaining address space for other subnets elsewhere in the organization.

The network and broadcast addresses at either end of a subnet's range are reserved for specific technical purposes rather than assigned to any device: the network address identifies the subnet itself in routing tables, and the broadcast address is used to send a single message to every device on that subnet simultaneously. This is exactly why a /24 subnet offers 256 total addresses but only 254 usable ones — the first and last are always set aside.

The /31 and /32 edge cases exist for specific, narrower purposes: a /31 prefix, defined specifically for point-to-point links between exactly two devices (such as two routers connected directly), skips the separate broadcast address entirely since only two addresses exist and both are usable. A /32 prefix identifies a single specific host with no broader network context at all, commonly used in routing tables to reference one exact device.

Frequently asked questions

What does the CIDR number (like /24) actually mean?

It's the number of leading bits in the 32-bit IPv4 address reserved for the network portion — /24 means the first 24 bits identify the network and the remaining 8 bits identify individual hosts, giving 256 total addresses in that block.

Why are only 2 addresses unusable in most subnets?

The very first address in a block is always reserved as the network address (identifying the subnet itself) and the very last is reserved as the broadcast address (sending to every host at once), so neither can be assigned to a device.

What's different about /31 and /32 subnets?

A /32 is a single host address with no network/broadcast concept, and a /31 (used for point-to-point links) has no separate broadcast address either — both of its two addresses are usable, per RFC 3021.