Skip to main content

Subnet CIDR Calculator

Calculate IPv4 and IPv6 subnet ranges, netmask, network and broadcast addresses and usable hosts from CIDR notation like 192.168.1.0/24.

CIDR notation

Stays in your browser

Subnet details

Enter an address with a prefix, such as 192.168.1.0/24 or 2001:db8::/32, then press Calculate.

Shortcuts: Ctrl+Enter run · Ctrl+Shift+C copy result · / search (use ⌘ on Mac)

Free Online Subnet CIDR Calculator

Enter an IPv4 address in CIDR notation to instantly see its network and broadcast addresses, subnet mask, usable host range, and total address count. It helps network engineers and developers calculate usable ranges, broadcast addresses, and masks from CIDR notation.

What this calculator shows

Given an address like 192.168.1.10/24, this tool separates the network and host portions using the prefix length, then derives the network address (all host bits zeroed), the broadcast address (all host bits set to one), the subnet mask and its inverse wildcard mask, and the range of addresses actually assignable to devices on that network. This is the same math network engineers do by hand when planning IP address allocation, just done instantly and without arithmetic mistakes.

How to use this tool

Type an IPv4 address followed by a slash and a prefix length between 0 and 32, then click Calculate. Each result field has its own copy button so you can quickly grab, for example, just the subnet mask to paste into a router configuration.

Common use cases

  • Planning how to split a larger network into smaller subnets for different departments or VLANs
  • Checking whether a given IP address falls within a particular subnet range
  • Looking up the broadcast address or usable host range for a firewall or DHCP configuration
  • Converting between a prefix length like /24 and its dotted-decimal subnet mask 255.255.255.0

All calculations happen locally in your browser using standard 32-bit bitwise arithmetic — no address you enter is ever sent to a server.

Worked example

192.168.1.10/24 gives network 192.168.1.0, broadcast 192.168.1.255, netmask 255.255.255.0, and a usable range of 192.168.1.1–192.168.1.254 (254 usable hosts out of 256 total). At the extremes, 10.0.0.4/31 gives exactly 2 addresses, both usable per RFC 3021 (10.0.0.4 and 10.0.0.5), and 10.0.0.5/32 gives a single address that is its own network, broadcast, and only usable host all at once.

Common mistakes and edge cases

  • Host bits in the address. 192.168.1.77/24 is accepted: the network address is still 192.168.1.0. The calculator shows the network the address belongs to, not the address you typed.
  • Very small networks. A /31 (two addresses) is treated as a point-to-point link, so both addresses are usable; a /32 is a single host. Neither has a separate network and broadcast address, so read the usable-host count shown instead of subtracting two.
  • Write a prefix, not a netmask. Enter 192.168.1.0/24. A netmask such as255.255.255.0 is not accepted as input; the calculator shows the netmask for the prefix you gave.
  • IPv6 has no broadcast address. For an IPv6 range you get the first and the last address of the prefix and the total number of addresses; there is no "usable hosts" count to subtract from.

Frequently asked questions

What is CIDR notation?
CIDR (Classless Inter-Domain Routing) notation writes a network as an IP address followed by a slash and a prefix length, like 192.168.1.0/24. The prefix length says how many leading bits of the address are the fixed "network" portion — the rest identify hosts within that network.
Why do /31 and /32 networks show different usable host counts?
A /32 is a single address with no network or broadcast concept, so it has exactly 1 usable address. A /31 has only 2 addresses total, and RFC 3021 allows both to be used as host addresses for point-to-point links (no separate network/broadcast address is reserved) — every other prefix reserves the first address as the network address and the last as the broadcast address, leaving the rest usable.
Does this support IPv6?
Yes. Type an IPv6 range such as 2001:db8::/32 and you get the network address (short and full form), the first and last address, how many addresses the prefix holds (as a power of two and exactly) and what kind of range it is: global unicast, unique local, link-local or documentation.
Is my IP address sent anywhere?
No. All the subnet math runs locally in your browser using standard bitwise arithmetic — nothing you enter is sent to a server.
What does the slash number in CIDR mean?
The number after the slash is how many bits of the address identify the network. /24 leaves 8 bits for hosts, which is 256 addresses (254 usable); /16 leaves 16 bits and gives 65,536. A bigger number means a smaller network, which is the part that surprises most people.

Related tools

More Code & Conversion

View all Code & Conversion tools →