Skip to main content

Online IP Subnet Calculator: Check the Math by Hand First

admin9 min read
Online IP subnet calculator result being checked against a hand-worked binary subnet calculation

You type 192.0.2.77/26 into an online IP subnet calculator, a network address comes back, and you have no easy way to tell whether it is right. This guide gives you the reasoning behind the answer so you can check it yourself. I use one IPv4 example from start to finish: first by hand with binary, then against three AllEasySEO calculators. For illustrations I use the 192.0.2.0/24 block, which RFC 5737 (January 2010) reserved for documentation, so none of these addresses belong to a live network.

The aim is not to avoid calculators. It is to know what a calculator is doing, so a typo, a wrong prefix or a misread range does not end up in a firewall rule.

Row of 32 tiles split into network bits and host bits to illustrate an IP address and CIDR prefix

What an online IP subnet calculator needs from you: address, mask and prefix

Three terms carry almost everything, so here are plain definitions.

  • IP address: in IPv4, a 32-bit number usually written as four decimal octets (8-bit groups), such as 192.0.2.77.
  • Subnet mask: a 32-bit pattern whose 1 bits mark the part of the address that identifies the network and whose 0 bits mark the host part.
  • CIDR prefix: the count of leading network bits, written after a slash. CIDR stands for Classless Inter-Domain Routing, described in RFC 4632 (August 2006).

The prefix and the mask carry the same information in two notations. In 192.0.2.77/24, the /24 means 24 network bits and 8 remaining bits, and the mask is 255.255.255.0.

Because CIDR is classless, do not infer a subnet mask from a legacy label such as Class C. A Class C address can sit in a /26, a /28 or any other block. The prefix that your network or provider gives you is what counts, and a good calculator needs that prefix as input.

Row of switches turned on from the left to represent the 1 bits in a subnet mask

How to read a /24 prefix and why masks use 255 and 0

Reading a prefix is counting. A /24 means the first 24 bits are the network, which is three full octets. That leaves 8 host bits, so the block holds 28 = 256 addresses. In an ordinary subnet the first address is the network address and the last is the broadcast address, which leaves 254 usable hosts.

Masks contain 255 and 0 because a mask is always a run of 1 bits followed by a run of 0 bits. An octet of eight 1s is 128+64+32+16+8+4+2+1 = 255. An octet of eight 0s is 0. When the prefix ends inside an octet, you get a partial value instead. For /26 the last mask octet is 11000000, which is 128+64 = 192.

PrefixMaskBlock size in changing octetUsable hosts (ordinary subnet)
/24255.255.255.0256254
/25255.255.255.128128126
/26255.255.255.1926462
/27255.255.255.2243230
/28255.255.255.2401614
/29255.255.255.24886
/30255.255.255.25242

The block size is 256 minus the mask octet. Subnets then start at multiples of that size, which is the shortcut I use for a quick sanity check.

Worked example: find the network for 192.0.2.77/26 with bitwise AND

RFC 950 (August 1985) describes finding the network by applying a bitwise AND of the address and the mask. AND keeps a 1 only where both input bits are 1. Only the last octet changes in this example, because the first three mask octets are all 255.

  1. Write the mask. /26 is 11111111.11111111.11111111.11000000, which is 255.255.255.192.
  2. Convert the changing octet. 77 = 64+8+4+1 = 01001101.
  3. AND it with the mask octet. See the working below.
  4. Rebuild the address. The result is 01000000 = 64, so the network is 192.0.2.64.
  5. Find the block size. 256 minus 192 is 64, so the block runs from 192.0.2.64 to 192.0.2.127.
  6. Find the broadcast boundary. Set every host bit to 1: 01111111 = 127, so the broadcast address is 192.0.2.127.
  7. State the usable range and counts. The ordinary usable range is 192.0.2.65 to 192.0.2.126. The block has 2(32-26) = 64 addresses, of which 62 are ordinarily usable as hosts.
  01001101   (77, the address octet)
AND 11000000   (192, the mask octet)
  --------
  01000000   (64, the network octet)

Now you have an answer to compare against any tool.

Check an online IP subnet calculator against your hand result

Run the same example through the tools and compare. I checked the tool pages on November 24, 2026; the subnet page labels its implementation review October 4, 2026.

  1. Run the full subnet. Enter 192.0.2.77/26 in the Subnet / CIDR Calculator. It accepts an IPv4 address with a slash prefix, or an address plus a separate prefix field from 0 to 32. Compare the network, broadcast, mask, binary mask, usable range and counts with your hand values. It handles one IPv4 subnet at a time, not IPv6 and not automatic splitting into several subnets.
  2. Check the AND in binary. In the Binary Calculator, explicitly select Binary for each operand, choose AND, and enter 01001101 and 11000000. You should get 01000000, which is 64 in decimal.
  3. Check it in hex. In the Hex Calculator, choose AND, enter 4D and C0 without 0x, and confirm the result is 40 in hex, which is 64 in decimal. Hex is just another way to write the same byte, not a different subnet rule.

Check only the changing octet. It avoids confusion about leading zeros in calculator output, and it is where mistakes happen. The subnet tool also labels an address type such as public address space, but that is a classification, and it does not verify live routing.

When a scientific-style calculator is enough and when you need a subnet tool

If you searched for a calculator online free scientific page, that kind of tool covers more than you might expect. It handles powers of two, 256 minus a mask octet, and finding the multiple of the block size that begins a block. For a /26 or /28 inside the last octet, that is often all you need.

It does not by itself show every IPv4 boundary, and it does not automate bitwise AND unless it has a bitwise mode. Switch to a dedicated subnet calculator when:

  • the prefix cuts across an octet in a way that makes hand arithmetic slow;
  • you are checking many boundaries;
  • you want the network, broadcast, mask and host range together in one view.

For a list of blocks at once, the CIDR to IP Range Converter returns the network, first and last IP, broadcast, subnet mask and host count for many blocks in one pass. That helps when you are reviewing a long allowlist.

What My IP Address and the Class C IP Checker can and cannot show

Two related AllEasySEO tools sit next to subnet work, but neither calculates a subnet or supplies a missing prefix.

My IP Address shows the public-facing address of the connection you are using now. That is not a way to discover a website’s server subnet. A VPN, a proxy or a shared outbound connection can make that public address differ both from your device’s private address and from the address of any website.

The Class C IP Checker scans domains in bulk and shows each IP and its Class C range, which helps you spot shared hosting blocks. Treat it as a preliminary comparison. Two addresses that share their first three octets do not prove the same owner, the same server or the same CIDR subnet. For example, 192.0.2.10 and 192.0.2.100 share three octets, yet in /26 blocks they fall in 192.0.2.0/26 and 192.0.2.64/26.

If you want a domain’s reported IP, ISP, country, reverse DNS and nameservers, the Hosting Checker covers that. Sharing a hosting range does not predict search rankings, and a subnet calculation does not change SEO performance.

Edge cases: /31, /32 and IPv6

Do not apply total minus two everywhere. RFC 3021 (December 2000) specifies that both addresses of a /31 can be host addresses on a point-to-point link, and a /32 identifies one single address. A calculator that follows the ordinary rule may show a /31 differently from how a router configured under RFC 3021 treats it, so read the tool’s notes.

IPv6 is a separate case. Addresses and prefixes are 128 bits long, and IPv6 has no IPv4-style broadcast address. Use the IPv6 Subnet Calculator for those prefixes rather than forcing them through an IPv4 tool.

What to do with the subnet result next

  1. Verify the prefix supplied by your network or hosting provider. A calculator can only work with the prefix you give it.
  2. Compare a proposed device or allowlist address with the calculated network and usable range. For example, 192.0.2.80 falls inside 192.0.2.64/26, and 192.0.2.130 does not.
  3. Check the destination platform’s configuration requirements before you change a firewall, DHCP pool or routing rule. Some systems want a prefix, others want a start and end address, and some want a wildcard mask.
  4. Test with documentation addresses first where you can, and record the prefix beside every range you save.

Remember that address arithmetic does not establish ownership, reachability or permission to use an IP.

Frequently asked questions

How do I read a /24 prefix?

The number after the slash is the count of leading network bits. A /24 has 24 network bits and 8 host bits, which gives a mask of 255.255.255.0 and 256 addresses. In an ordinary subnet, 254 of them are usable as hosts.

Why do subnet masks use 255 and 0?

A mask is a run of 1 bits followed by 0 bits. An octet of eight 1s equals 255 and an octet of eight 0s equals 0. When the prefix ends inside an octet you get values such as 128, 192, 224 or 240.

What should I do with the result of a subnet calculator?

Confirm the prefix with your network or hosting provider, compare any device or allowlist address with the network and usable range, and check what the destination platform expects before editing a firewall, DHCP pool or routing rule.

Is a scientific-style calculator enough for subnet math?

It is enough for powers of two, 256 minus a mask octet and finding the start of a block. It does not by itself show every boundary or perform bitwise AND, so use a dedicated subnet tool for tricky prefixes or many checks.

Can I tell the subnet mask from a Class C label?

No. CIDR is classless, so a legacy Class C label does not tell you the current mask. Use the prefix given by your network or provider.

Does every subnet have total addresses minus two usable hosts?

No. That is the ordinary rule. RFC 3021 allows both addresses of a /31 to be hosts on a point-to-point link, and a /32 identifies a single address.

Can My IP Address or the Class C IP Checker calculate my subnet?

No. My IP Address shows the public-facing address of your current connection, and the Class C IP Checker compares reported addresses and their first three octets. Neither calculates a subnet or supplies a missing prefix.

Next steps

An online IP subnet calculator saves time, but it earns trust when you can reproduce one answer yourself. To read /24, count 24 network bits and 8 host bits. Masks use 255 and 0 because they are runs of 1 bits followed by 0 bits. With the result in hand, confirm the prefix, compare addresses against the range, and check your destination platform before you change anything. Do the hand AND once on a documentation address such as 192.0.2.77/26, and the calculator’s output will make sense from then on.

Related tools and resources on AllEasySEO:

Sources and further reading

Try these free SEO tools

Free, browser-based and no signup needed.

See all free SEO tools