Enter an IP address and click
Calculate Subnet

Subnet Calculator - compute your IP network range in seconds

Planning a network without subnetting is like designing a building without knowing the floor plan. Whether you're configuring a home lab, a corporate LAN, or a cloud environment, the subnet calculator gives you every value you need from just two inputs — an IP address and a CIDR prefix.

How to use this subnet calculator

Enter your IPv4 address (e.g. 192.168.1.0) in the IP Address field, then select your CIDR prefix length from the dropdown (e.g. /24). Click Calculate Subnet to instantly display your network details.

Understanding the formula: how subnetting works

Subnetting divides an IP address space into smaller, manageable blocks. The CIDR prefix defines how many bits belong to the network portion of the address.

Key values produced by the calculator

Subnet mask — derived directly from the prefix length. A /24 prefix yields 255.255.255.0, meaning the first 24 bits identify the network.

Network address — the first address in the block, obtained by applying a bitwise AND between the IP address and the subnet mask.

Broadcast address — the last address in the block, where all host bits are set to 1.

Usable host range — all addresses between network and broadcast. The number of usable hosts = 2^(32 − prefix) − 2.

Calcul subnet — exemples vérifiés par notation CIDR

La notation CIDR détermine directement le nombre d'adresses utilisables dans un sous-réseau. Plus le préfixe est grand, plus le bloc est petit.

  • /24 — Masque 255.255.255.0 : 254 hôtes utilisables, avec une plage allant de 192.168.1.1 à 192.168.1.254. C'est le sous-réseau le plus courant dans les réseaux locaux d'entreprise ou domestiques.
  • /25 — Masque 255.255.255.128 : le bloc est divisé en deux, offrant 126 hôtes utilisables de 192.168.1.1 à 192.168.1.126. Utile pour segmenter un réseau /24 en deux zones distinctes.
  • /28 — Masque 255.255.255.240 : seulement 14 hôtes utilisables, de 192.168.1.1 à 192.168.1.14. Un bloc adapté aux petites équipes ou aux segments dédiés comme les imprimantes ou les caméras IP.
  • /30 — Masque 255.255.255.252 : exactement 2 adresses utilisables, de 192.168.1.1 à 192.168.1.2. C'est le plus petit bloc pratique — utilisé exclusivement pour les liaisons point-à-point entre deux routeurs, où seules deux adresses sont nécessaires.

Where subnetting decisions actually matter

Subnetting is not just a theoretical exercise. In a Swiss SME running a mixed wired/wireless network, a typical setup might use:

  • /24 for the main office LAN (up to 254 devices)
  • /26 for the guest Wi-Fi (up to 62 devices, isolated from internal traffic)
  • /30 for the router-to-firewall uplink (2 addresses, nothing wasted)

This segmentation limits broadcast traffic, improves security, and simplifies firewall rule management — three priorities that come up in every serious network audit.

Common subnetting mistakes

1. Forgetting to subtract 2 from the host count. A /24 gives 256 addresses, not 254 usable ones. Network and broadcast addresses are always reserved and cannot be assigned to devices.

2. Choosing a prefix that's too large for future growth. A /28 gives 14 hosts — fine today, but adding devices later may require renumbering the entire segment. Plan with headroom.

3. Overlapping subnet ranges. Two subnets like 192.168.1.0/24 and 192.168.1.128/25 overlap, which causes routing conflicts. Always verify that address ranges don't intersect before deployment.


⚠️ This tool is provided for informational and planning purposes only. Always validate subnet configurations against your specific network infrastructure before deployment. Results are based on standard IPv4 subnetting rules — consult a qualified network engineer for complex or production-critical environments.

Questions fréquentes

What is CIDR notation?

CIDR (Classless Inter-Domain Routing) expresses a network address and its prefix length together — for example, 10.0.0.0/16. It replaced the older class-based system (Class A/B/C) for greater flexibility.

What's the difference between a subnet mask and a CIDR prefix?

They carry the same information in different formats. /24 and 255.255.255.0 are equivalent — the prefix is simply a compact way to write the mask.

Can I use this for IPv6?

This calculator is designed for IPv4. IPv6 subnetting follows the same logical principles but uses 128-bit addresses and different prefix conventions.

What is a wildcard mask?

A wildcard mask is the bitwise inverse of the subnet mask — used primarily in Cisco ACLs and OSPF configurations. For a /24, the wildcard is 0.0.0.255.

How many subnets can I create from a /22?

A /22 contains 1024 addresses. You can split it into 4 subnets of /24, or 8 subnets of /25, or any other combination as long as prefix lengths are consistent.