CIDR / Subnet Calculator (IPv4)
Calculate IPv4 subnets from CIDR notation online. Get network address, broadcast, netmask, wildcard, usable host range, IP class, and binary representation. 100% local — nothing leaves your browser.
Last updated:
Subnet range
256 total addresses · 254 usable hosts (192.168.1.1 – 192.168.1.254)
Network address
192.168.1.0
Broadcast address
192.168.1.255
Netmask
255.255.255.0
Wildcard mask
0.0.0.255
First usable host
192.168.1.1
Last usable host
192.168.1.254
Binary representation
Bits highlighted in brand color are the network portion (/24); the rest is the host portion.
Network as decimal
3,232,235,776
Broadcast as decimal
3,232,236,031
Enter an IPv4 CIDR block (e.g. 10.0.0.0/24) to compute the network address, broadcast address, netmask, wildcard mask, first / last usable host, and total addresses. Also does IP ↔ integer conversion. 100% local.
Tips & Best Practices
- ▸For subnets smaller than /31, the first and last address in the block are the network and broadcast respectively — not assignable to hosts.
- ▸/31 and /32 have special rules per RFC 3021 / RFC 4632; the calculator handles them correctly.
- ▸The IP-to-integer conversion is useful when storing IPs in a compact database column or comparing ranges.
Frequently Asked Questions
What is CIDR notation?
CIDR (Classless Inter-Domain Routing) writes an IP address followed by a slash and the number of bits used for the network prefix, e.g. 192.168.1.0/24. The prefix defines the subnet size — /24 means 256 addresses, /16 means 65 536, and so on. It replaces the older Class A/B/C system.
Why does /24 give 254 usable hosts instead of 256?
A /24 has 256 total addresses, but the first (network address) and last (broadcast address) are reserved and cannot be assigned to hosts. That leaves 254 usable. Exception: /31 subnets (point-to-point per RFC 3021) let both addresses be assigned, and /32 represents a single host with 1 usable address.
Which IP ranges are private?
Per RFC 1918: 10.0.0.0/8, 172.16.0.0/12, and 192.168.0.0/16. RFC 6598 adds 100.64.0.0/10 for carrier-grade NAT. The tool flags any IP that falls into these ranges as private, plus loopback (127/8), link-local (169.254/16), and multicast (224/4).
Does this tool support IPv6?
Not yet — this calculator is IPv4 only. IPv6 subnet math requires 128-bit BigInt arithmetic and a different notation for private ranges. Consider adding IPv6 support to your feature request list.
Related Tools
cURL Converter
Convert cURL commands to Python (requests), JavaScript (fetch), Node.js, Go (net/http), PHP, or Java (HttpClient). Parses -H, -d, --data-urlencode, -F, -u, --json and more. 100% local.
URL Parser
Parse any URL into scheme, host, port, path, and query parameters — or build a URL from scratch with a form. Great for debugging redirect chains, tracking pixels, and OAuth flows. 100% local.
URL Encode/Decode
Percent-encode and decode URLs online. Handles query strings, path segments, and special characters correctly.
Color Converter
Convert colors between HEX, RGB, HSL, and HSV instantly. Includes a live color preview and copy-ready CSS strings.
HTML Minifier
Minify HTML by removing comments, collapsing whitespace, and stripping optional attribute quotes and void-element slashes. Reports byte savings. Preserves IE conditional comments and preformatted <pre> / <textarea> / <script> / <style> content. 100% local.
HTML Beautify
Format messy or minified HTML with clean indentation and line breaks. Handles void elements (<br />), preserves preformatted <pre> / <textarea> / <script> / <style>, and normalizes self-closing tags. 100% local.