What this tool does
This CIDR calculator takes an IPv4 block such as 192.168.1.130/26 and works out everything the
prefix implies: the netmask and its wildcard, the network and broadcast addresses, the first and
last usable host, the total address count and how many of those you can actually assign. Paste a
host address rather than a network address and it tells you which network that host belongs to,
which is usually the question you meant to ask.
Two extras sit underneath. A subnet mask in dotted form converts back to a prefix, for when a config file gives you 255.255.254.0 and you need to know it is a /23. And an arbitrary start-and-end range converts into the shortest list of CIDR blocks that covers it exactly — the calculation you need when a firewall rule accepts prefixes but the requirement arrived as "from this address to that one".
What the number after the slash means
The prefix length is the count of bits, from the left, that identify the network. The rest identify the host. A /24 fixes the first 24 bits, leaving 8 for hosts, which is 256 addresses; a /26 fixes 26 bits and leaves 64.
Every bit you take from the host side halves the block. That single fact makes the whole table memorable: /24 is 256, /25 is 128, /26 is 64, /27 is 32, /28 is 16. Going the other way doubles: a /23 is two /24s that happen to be adjacent and aligned.
Alignment is the constraint people forget. A block must start on a multiple of its own size, so 192.168.4.0/23 is legal and 192.168.5.0/23 is not, because 5 is not a multiple of 2. This is also why splitting a range that begins one address above a boundary produces a long list of blocks rather than one tidy prefix.
Why two addresses are usually missing
In a normal subnet the lowest address is the network identifier and the highest is the directed broadcast. Neither can be assigned to an interface, which is where "total minus two" comes from.
The exceptions are worth knowing because most calculators get them wrong. A /31 has two addresses and no network or broadcast at all: RFC 3021 gives both to the two ends of a point-to-point link, so the honest answer is two usable hosts, not zero. A /32 is a single address — a host route, the shape you see in routing tables and firewall rules — and the honest answer is one, not minus one. This calculator reports both cases as they are and explains the exception under the results.
Private, reserved, and everything else
Three ranges are reserved for internal use by RFC 1918: 10.0.0.0/8, 172.16.0.0/12 and 192.168.0.0/16. The middle one causes trouble because /12 stops at 172.31.255.255, not at 172.255.255.255. Alongside those, the tool recognises loopback (127.0.0.0/8), link-local (169.254.0.0/16, the address your machine gives itself when DHCP fails), carrier-grade NAT (100.64.0.0/10), the documentation ranges from RFC 5737 and multicast space, and labels anything else as globally routable.
Class A, B and C are reported too, because certification exams and older documentation still use them. They have not governed routing since classless inter-domain routing arrived in 1993 — the prefix does that job now — so treat the class as trivia rather than as an answer.
Working on the same box? The number base converter shows the same masks in binary, where the contiguous run of ones is visible, and the chmod calculator covers the other set of bits you will be arguing about on that server.