A SMALL TOOL FOR YOUR NETWORK
IPv4 subnet & CIDR calculator
Calculate network and broadcast addresses, subnet mask and address counts from an IPv4 CIDR block, supporting /0 through /32.
Ready. Run the tool to see your result.
How to use this tool
- Enter an IPv4 address followed by a prefix from /0 to /32.
- Calculate the network, mask, block end and total address count.
- Interpret usable ranges for your network. /31 and /32 are handled separately.
A CIDR prefix counts network bits. Ordinary subnets reserve their first and last addresses. A /31 is treated as two point-to-point endpoints; a /32 contains one host address.
Worked example
Example input
192.168.1.10/24Network: 192.168.1.0 Mask: 255.255.255.0 Broadcast: 192.168.1.255 Total: 256; ordinary usable: 254 Range: 192.168.1.1–192.168.1.254
Every host address in the same /24 produces the same network range.
Common questions
How is the network address calculated?
Treat the address as a 32-bit integer. A /p block contains 2^(32−p) addresses. Round the integer down to a multiple of the block size to find the network. The first p bits of the mask are ones.
Why does a /31 have two usable addresses?
RFC 3021 allows both addresses on a point-to-point link. This assumes compatible devices and the intended link type; it does not mean every traditional broadcast network can use that arrangement.
Data sources & privacy
This tool processes its input in your browser; the tool does not upload the input or result to a calculation API. Clipboard copying is optional.
This page uses Google Analytics and Microsoft Clarity for visit analytics. Input and result areas are configured for Clarity masking. Hosting providers and analytics services may process technical request data; this is not a promise of anonymous browsing.
Technical references