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:
CommentsEnter 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.
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
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.
Try Next
Meta Tag Preview
Preview how your page will appear in Google search results and social share cards on Facebook, Twitter/X, and LinkedIn. Parses <title>, meta description, canonical, and full Open Graph / Twitter Card tags with diagnostics. 100% local.
Related Tools
HTTP Status Codes
Complete reference of HTTP status codes with meanings, use cases, and RFC citations. Search 60+ codes from 100 Continue to 511 Network Authentication Required.
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.
Color Converter
Convert colors between HEX, RGB, HSL, and HSV instantly with a live color preview and copy-ready CSS strings. Free, no signup, runs entirely in your browser.
User Agent Parser
Parse User-Agent strings to identify browser, engine, operating system, and device. Instantly see what your own browser sends.
CSS Specificity
Calculate CSS selector specificity. See exactly how each part of a selector contributes to the (a,b,c,d) weight. Includes IDs, classes, attributes, pseudo-classes, type selectors, and pseudo-elements. 100% local.