Skip to content

Menu

Network Mask Calculator

Calculate subnet masks and IP ranges

Runs entirely in your browserNetworkFree, no sign-up
Loading tool

01What is Network Mask Calculator?

Subnet maths is easy to get almost right, and almost right is how two VPCs end up overlapping. This calculator takes one line of input and gives you the whole picture of an IPv4 block. It accepts CIDR form like 10.0.0.0/16, an address followed by a dotted mask (10.20.30.40 255.255.240.0 or 10.20.30.40/255.255.240.0), a bare subnet mask like 255.255.255.240, or a plain IP. Under the hood it turns the address into a 32-bit unsigned integer, builds the mask from the prefix length, and does bitwise AND and OR to find the edges. You get the network address, broadcast address, subnet mask, wildcard mask, total addresses, usable hosts and the first and last usable host. Results update as you type, so there's no button to press. Input is checked strictly. Each octet must be 0 to 255 with no leading zeros, so 010.0.0.1 is rejected rather than guessed at. A prefix must be a whole number from 0 to 32. A dotted mask must have contiguous 1 bits, so 255.0.255.0 fails with an error. Small blocks follow RFC 3021: a /31 point-to-point link counts both addresses as usable, a /32 is a single host, and neither shows a broadcast address. The result also shows the legacy class (A to E) and a Range Type taken from the IANA IPv4 special-purpose registry. That covers RFC 1918 private space, carrier-grade NAT from RFC 6598, loopback, link-local, documentation ranges, multicast and public. The binary panel lines up the network, mask and wildcard bit by bit, which is the fastest way to see where the boundary falls. Copy puts a short plain-text summary on your clipboard. A worked example: enter 100.64.5.9/10. The tool masks it down to network 100.64.0.0 with broadcast 100.127.255.255, mask 255.192.0.0 and wildcard 0.63.255.255. That is 4,194,302 usable hosts, Range Type is shared address space (carrier-grade NAT), and the legacy class is A. One quirk to know. A lone address is first tested as a mask, and only treated as a /32 host if that fails. Most host IPs fail that test, but an address whose bits happen to be contiguous ones, such as 192.0.0.0 or 255.255.0.0, is read as a mask. The tool says so in a note above the results, and adding a prefix removes the ambiguity. IPv6 isn't supported. Your addresses stay in the browser tab, since every step is local integer maths.

Cloud and network engineers who carve VPCs, write firewall rules or ACLs and want the network, broadcast and wildcard in one glance. The tool runs entirely in your browser, so your data never leaves your device.

02How to use Network Mask Calculator

  1. Type an address with a prefix (192.168.1.0/24), an address with a dotted mask, a subnet mask alone (255.255.255.0) or a single IP into the input box.
  2. Read Network Address, Broadcast, Subnet Mask and Wildcard Mask in the first row.
  3. Check Usable Hosts, Total Addresses, Legacy Class and Range Type in the second row.
  4. Look at Host Range and the Binary Representation panel to see where the boundary sits.
  5. Click Copy for a text summary, or Reset to clear the box.

03Worked examples

Input: 192.168.1.77/26
Result: Network 192.168.1.64/26, Broadcast 192.168.1.127, Mask 255.255.255.192, Wildcard 0.0.0.63, Host Range 192.168.1.65 to 192.168.1.126 (62 usable), Private (RFC 1918)
A host address is accepted and masked down to its subnet.
Input: 10.20.30.40 255.255.240.0
Result: Network 10.20.16.0/20, Broadcast 10.20.31.255, Wildcard 0.0.15.255, 4,096 total / 4,094 usable
Input: 100.64.5.9/10
Result: Network 100.64.0.0/10, Broadcast 100.127.255.255, Mask 255.192.0.0, Wildcard 0.63.255.255, 4,194,302 usable, Shared address space (carrier-grade NAT), Class A
RFC 6598 space. Not RFC 1918, but still not publicly routable.
Input: 172.16.5.4/31
Result: Broadcast none (/31, /32), 2 total / 2 usable, Host Range 172.16.5.4 to 172.16.5.5
RFC 3021 point-to-point link, so both addresses are usable.
Input: 255.255.255.240
Result: Network 0.0.0.0/28, Wildcard 0.0.0.15, 16 total / 14 usable, note: Read as a subnet mask (/28).
A lone mask is read as a mask and calculated against 0.0.0.0, so only the sizes are meaningful.
Input: 192.168.1.0/33
Result: Error: CIDR prefix must be a whole number from 0 to 32

04Common use cases

  • Planning VPC and subnet CIDR blocks in AWS, Azure or GCP before writing Terraform
  • Converting a dotted subnet mask from an old router config into a /prefix
  • Getting the wildcard mask for a Cisco ACL or an OSPF network statement
  • Finding which subnet a host belongs to by pasting the host IP with its prefix
  • Checking whether an address block is RFC 1918, carrier-grade NAT or public before adding it to a firewall rule
  • Confirming that a /31 router link really gives two usable addresses
  • Checking subnetting answers while studying for CCNA or Network+

05Tips

  • Cloud providers reserve extra addresses. AWS keeps five per subnet, so a /24 there leaves 251 usable IPs, not the 254 shown here.
  • If a note says your input was read as a subnet mask, add a prefix. A bare 192.0.0.0 is taken as a /2 mask, not as a host.
  • The wildcard mask is the bitwise inverse of the subnet mask, which is why Cisco ACLs write a /24 as 0.0.0.255.
  • Range Type is judged from the network address. 100.64.0.0/10 shows as carrier-grade NAT and 169.254.0.0/16 as link-local, and neither is routable on the internet.
  • Leading zeros are rejected on purpose. Some older parsers read 010 as octal 8, so the tool refuses to guess.

06Related concepts

CIDR notation, subnet mask, wildcard mask, broadcast address, RFC 1918.

Frequently Asked Questions

What is Network Mask Calculator?

Network Mask Calculator is a free, browser-based developer tool on AIDToolStack. Calculate subnet masks and IP ranges It requires no installation or sign-up and works entirely in your browser.

Is Network Mask Calculator free to use?

Yes. No sign-up, no fees and no usage cap.

Does Network Mask Calculator store my data?

No. It runs in your browser; nothing is uploaded.

Reviews and commentsShow

Reviews

Sign in to leave a review.

Loading reviews…

Comments

Sign in to leave a comment.

Loading comments…

What changed in AI dev tools, once a month

Renames, shutdowns, pricing changes and new MCP setups, each with a source.

Subscribe