induwara.lk
induwara.lkDeveloper · Networking

IP Subnet Calculator (CIDR / IPv4)

Enter an IPv4 address and a CIDR prefix to get the network and broadcast addresses, usable host range, host count, subnet mask, wildcard, IP class and address type — and split a block into equal subnets. Pure bit math, runs entirely in your browser, no signup.

By Induwara AshinsanaUpdated Jun 8, 2026
Subnet calculatorIPv4 / CIDR
Cross-checked

Dotted-decimal, e.g. 192.168.10.130. Each octet 0–255.

/26
Try
Network address
192.168.10.128
Broadcast address
192.168.10.191
Usable hosts
62
64 total addresses
Usable host range
192.168.10.129 – 192.168.10.190

Full breakdown

FieldValue
CIDR notation192.168.10.128/26
Subnet mask255.255.255.192 (/26)
Wildcard mask0.0.0.63
Address typePrivate (RFC 1918)
IP classClass C (192.0.0.0 – 223.255.255.255)
IP in binary11000000.10101000.00001010.10000010
Mask in binary11111111.11111111.11111111.11000000
IP as integer3,232,238,210
Previous subnet192.168.10.64/26
Next subnet192.168.10.192/26

Bit math follows RFC 4632 (CIDR). Address-type ranges from RFC 1918, 6598, 3927, 5737 and the IANA IPv4 Special-Purpose registry — all cited below. Runs entirely in your browser; nothing is sent to a server.

How it works

A subnet calculator works on the 32-bit integer behind every IPv4 address. The dotted-decimal form 192.168.10.130 is really four 8-bit octets packed into one 32-bit number. The CIDR prefix (the /26 part) says how many leading bits identify the network; the rest identify the host. This is the classless model defined in RFC 4632, which replaced the older fixed Class A/B/C boundaries.

  1. Build the mask. A prefix of p sets the top p bits to 1: mask = 0xFFFFFFFF << (32 − p). For /26 that is 255.255.255.192.
  2. Wildcard mask. Invert the mask: wildcard = NOT mask — 0.0.0.63 for a /26. Cisco ACLs and OSPF statements match on this.
  3. Network address. network = IP AND mask. This zeroes the host bits, giving the first address in the block.
  4. Broadcast address. broadcast = network OR wildcard — the last address, where every host bit is 1.
  5. Host count. A block holds 2^(32 − p) addresses. For prefixes /30 and shorter, two are reserved (network + broadcast), so usable hosts = 2^(32 − p) − 2. A /31 (RFC 3021) makes both addresses usable for point-to-point links, and a /32 is a single host route.
  6. Address type. The tool tests the address against the IANA special-purpose ranges using the same AND-with-mask containment test: private (RFC 1918: 10/8, 172.16/12, 192.168/16), loopback (127/8), CGNAT (RFC 6598: 100.64/10), link-local (RFC 3927: 169.254/16), documentation (RFC 5737), multicast and reserved. Anything else is public.

Every result is verified two ways: the network address is computed once on the full 32-bit integer (IP AND mask) and once by masking each octet independently. The two paths must agree, and the calculator shows a “Cross-checked” badge when they do. JavaScript treats bitwise operands as signed 32-bit values, so each step is normalised back to unsigned, and the /0 case (which would otherwise hit a <<32 no-op bug) is handled explicitly.

Worked examples

192.168.10.130 /26 — a host inside a block

  1. Mask /26 = 255.255.255.192, wildcard = 0.0.0.63, block size = 2^6 = 64
  2. 130 in binary is 10000010; AND 11000000 (192) → 10000000 = 128
  3. Network = 192.168.10.128, broadcast = 192.168.10.191
  4. Usable range: 192.168.10.129 – 192.168.10.190
  5. Total 64 addresses, usable 62 (64 − 2)
  6. Class C, Private (RFC 1918, 192.168.0.0/16)

10.20.0.0 /22 — a multi-octet mask for a VPC

  1. Mask /22 = 255.255.252.0, wildcard = 0.0.3.255, block size = 2^10 = 1024
  2. The mask borrows 6 bits of the third octet (252), so blocks step by 4 there
  3. Network = 10.20.0.0, broadcast = 10.20.3.255
  4. Usable range: 10.20.0.1 – 10.20.3.254
  5. Total 1,024 addresses, usable 1,022
  6. Class A, Private (RFC 1918, 10.0.0.0/8)

172.16.45.14 /30 — a point-to-point link

  1. Mask /30 = 255.255.255.252, wildcard = 0.0.0.3, block size = 4
  2. 14 (00001110) AND 252 (11111100) → 12 (00001100)
  3. Network = 172.16.45.12, broadcast = 172.16.45.15
  4. Usable range: 172.16.45.13 – 172.16.45.14 (just 2 hosts)
  5. Class B, Private (RFC 1918, 172.16.0.0/12)

Frequently asked questions

Sources & references

Related tools

Rate this tool
Be the first to rate

Comments & feedback

Spotted a bug or want an improvement? Tell us — our team reviews every comment, and good ideas get built. Comments are public and anonymous.

Found a bug, edge case, or want to suggest an improvement?

Email me at [email protected] — most fixes ship within 24 hours.