inyourbrowser.com

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.

Network address192.168.1.0
Broadcast address192.168.1.255
Subnet mask255.255.255.0
First usable host192.168.1.1
Last usable host192.168.1.254
Usable hosts254
Total addresses256
IP classC

/24 · 255.255.255.0 · 254 usable hosts

How to use the CIDR calculator

  1. Enter a CIDR notation address, for example, 192.168.1.0/24 or 10.0.0.0/8.
  2. The tool calculates network address, broadcast address, subnet mask, first and last host, and total host count.
  3. Use the dual-input mode to enter an IP address and prefix length separately.
  4. Copy any value from the results table to use in your network configuration.

Common uses

  • Planning subnets and IP address ranges for network infrastructure, using a byte converter for bandwidth calculations
  • Checking how many hosts a specific CIDR block can accommodate
  • Verifying that an IP address falls within a given network range, and use the number base converter to translate subnet masks between decimal and binary

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/8 to 192.168.1.5/32).
  • Output: Network and broadcast addresses, subnet mask (dotted decimal), first and last host, total host count, and IP class designation (A, B, C, D, E).
  • Known limitations: IPv6 is not yet supported. 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?
No. All calculations are pure JavaScript bit arithmetic running in your browser.
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 current version supports IPv4 CIDR notation. IPv6 support is planned for a future update.

Reviewed and tested May 26, 2026.