CIDR / subnet calculator
CIDR calculator is a networking tool that derives subnet details from any IPv4 CIDR notation. It returns the network address, broadcast address, subnet mask, first and last usable hosts, and the total host count for any prefix from /0 to /32. The tool runs in your browser.
/24 · 255.255.255.0 · 254 usable hosts
Dedicated pages
Direct links for subnet and CIDR topics.
Subnet calculator
Calculate subnet details from CIDR notation. Get network address, broadcast, host range, subnet mask and usable hosts. Free, in-browser.
IP subnet mask calculator
Calculate the subnet mask, wildcard mask, network address and usable host range for any IPv4 address and prefix from /0 to /32. Free, in-browser.
CIDR notation calculator
Understand and calculate CIDR notation. Enter any CIDR block to see the IP range, subnet mask, and host count. Free, in-browser.
How to use the CIDR calculator
- Type or paste an IPv4 CIDR block into the CIDR block field, for example 10.0.0.0/8 or 192.168.1.0/24.
- If you have a host address rather than the network address, enter it with its prefix, for example 192.168.1.130/26. The tool masks it to the network, 192.168.1.128.
- Read the results table: network and broadcast address, subnet mask, wildcard mask, first and last usable host, usable hosts, total addresses and IP class.
- If a message appears instead of results, fix the input: four numbers from 0 to 255 without leading zeros, a slash, then a prefix from 0 to 32.
- Select a value in the table and copy it into your router, firewall or cloud network settings.
Common uses
- Planning subnets for a VPC or office network and checking that each block has enough usable hosts
- Finding the range a host address belongs to: 10.1.4.77/22 sits in 10.1.4.0 to 10.1.7.255
- Reading a subnet mask bit by bit after converting each octet to binary
- Setting up a new Linux server: plan its address here, then work out the permission bits for its config files
Technical specification
- Algorithm or formula: Bitwise math on a 32-bit unsigned integer view of the IP. Network =
ip & mask, broadcast =network | ~mask, total hosts =2^(32 − prefix), usable hosts = total − 2 for prefixes 0 to 30. - Browser API or library: Pure JavaScript bitwise operations. No external library.
- Input limits: IPv4 CIDR notation only (e.g.
10.0.0.0/8to192.168.1.5/32). - Output: Network and broadcast addresses, subnet mask and wildcard mask (dotted decimal), first and last host, total host count, and IP class designation (A, B, C, D, E).
- Known limitations: IPv4 only; IPv6 addresses are not accepted. Variable-length subnet masking (VLSM) helper output is not included.
Frequently asked questions
- What is CIDR notation?
- CIDR (Classless Inter-Domain Routing) notation expresses an IP address and its network prefix length together, for example, 192.168.1.0/24, where /24 means the first 24 bits are the network identifier.
- Is my data sent to a server?
- All calculations are pure JavaScript bit arithmetic running in your browser. Our servers are not involved at any point.
- How many usable hosts are in a /24 network?
- A /24 network contains 256 addresses. Subtract 2 (network and broadcast addresses) for 254 usable host addresses.
- Does the tool support IPv6?
- The calculator handles IPv4 CIDR blocks from /0 to /32. An address that contains a colon, as every IPv6 address does, shows a message asking for an IPv4 block instead.
Related tools
Chmod calculator
Click permission bits to get the numeric (755) and symbolic (rwxr-xr-x) notation instantly.
Number base converter
Convert numbers between binary, octal, decimal, and hex. All bases shown at once.
Byte converter
Convert between bytes, KB, MB, GB and TB in both decimal (SI) and binary (IEC) units.
- Background reading: Complete guide to developer tools
Reviewed and tested September 30, 2026.