IPv4 Subnet Calculator (CIDR / VLSM)
Compute network, broadcast, first/last usable host, host count, subnet & wildcard mask, IP class, and private/reserved detection from an IPv4 address + CIDR (or dotted / inverse mask). Includes binary bit visualization, even split into N subnets, VLSM best-fit allocation from host requirements, overlap / containment checker between two blocks, and CSV / JSON export. 100% client-side.
About IPv4 Subnet Calculator (CIDR / VLSM)
Compute network, broadcast, first/last usable host, host count, subnet & wildcard mask, IP class, and private/reserved detection from an IPv4 address + CIDR (or dotted / inverse mask). Includes binary bit visualization, even split into N subnets, VLSM best-fit allocation from host requirements, overlap / containment checker between two blocks, and CSV / JSON export. 100% client-side. Everything runs locally in your browser — your data never leaves your device.
How to use
- Enter your input in the tool above.
- Adjust any options to your preference.
- Use the Copy or Download buttons to save the result.
- Everything happens locally — your data never leaves your browser.
FAQ
How does the subnet calculator compute network and broadcast addresses?
Given an IPv4 address and a CIDR prefix length, the tool builds a 32-bit subnet mask (CIDR ones followed by zeros), ANDs it with the IP to get the network address, and ORs the IP with the inverse (wildcard) mask to get the broadcast address. The first usable host is network + 1, the last usable host is broadcast − 1, and the host count is 2^(32−CIDR) − 2 for /0–/30. /31 (RFC 3021) yields 2 point-to-point hosts and /32 yields a single host route.
Can I enter the mask in dotted-decimal or inverse form, not just CIDR?
Yes. The mask field accepts CIDR notation (/24), a bare integer (24), a dotted-decimal mask (255.255.255.0), or an inverse / wildcard mask (0.0.0.255). The parser validates that the mask is contiguous (all ones followed by all zeros, or the inverse) and converts it to the equivalent prefix length. You can also enter 'IP/CIDR' or 'IP mask' as a single combined input.
How does VLSM allocation work?
Enter your parent block (e.g. 192.168.1.0/24) and a list of subnets by required host count (one per line, e.g. 'LAN-A 50'). The tool sorts requirements largest-first (best-fit), computes the smallest prefix that fits each (2^(32−c) − 2 ≥ hosts), aligns each subnet to its block boundary, and allocates sequentially from the parent's network address. Subnets that don't fit are flagged as overflow. A waste percentage shows how much of the parent block is unused.
How is the even split calculated?
Pick a parent block and a target count N. The tool finds the smallest extra bit count b such that 2^b ≥ N, giving the new prefix parentCidr + b. It then lists all 2^b equal-sized subnets with their network / broadcast / mask / host count. For example, splitting 192.168.1.0/24 into 4 subnets yields four /26s (.0, .64, .128, .192).
What extra features does this tool have versus other subnet calculators?
(1) Single-subnet compute with full breakdown (network, broadcast, host range, mask, wildcard, class, private/reserved). (2) Accepts CIDR, dotted, or inverse masks. (3) Color-coded 32-bit binary visualization of IP, mask, network, and wildcard. (4) Even split into N subnets. (5) VLSM best-fit allocation with waste reporting. (6) Overlap / containment checker between two CIDR blocks. (7) IP class (A/B/C/D/E) and RFC 1918 private / reserved / loopback / link-local detection. (8) RFC 3021 /31 and /32 support. (9) CSV and JSON export. (10) History (localStorage, last 20). (11) Shareable URL with full state encoded. 100% client-side — no uploads, no ads.
Related tools
.bashrc / .zshrc Alias & Config Manager
Build shell aliases, functions, exports, and PATH edits in a visual editor, then export a clean, commented .aliases file sourced from both .bashrc and .zshrc — with shadowing detection against shell builtins and common CLI tools, function suggestions when args are needed, starter packs (git, docker, kubectl, navigation, safety, ls, dev, devops, data science), import of existing rc files, dedupe, history (localStorage), and shareable URL. 100% client-side.
Add / Subtract Date Calculator
Add or subtract years, months, weeks, days, hours, minutes and seconds from a starting date/time. Calendar-day or business-day mode with custom weekend + holiday list. Month-end policy toggle (clamp to last day vs overflow). Repeat/series mode (e.g. every 2 weeks x 10) with CSV export. Shareable URL. 100% client-side.
Age Calculator
Calculate exact age from a birth date in calendar years/months/days (no negative-day bugs) plus totals in months/weeks/days/hours/minutes/seconds. Next-birthday countdown with weekday. Feb-29 birthday policy toggle. Milestones (1,000 days, 10,000 days, 1 billion seconds). Zodiac sign + Chinese zodiac. Age gap comparison. Shareable URL. 100% client-side.