CIDR notation -- the '/24' at the end of an IP address like 192.168.1.0/24 -- tells you how many bits of the address are fixed as the network portion. The remaining bits identify individual hosts on that network. A smaller number after the slash means more host bits, which means a bigger network; a larger number means fewer host bits and a smaller network.
The two addresses you always lose
For any standard subnet, the very first address in the range is reserved as the network address (it identifies the subnet itself, not a host), and the very last address is reserved as the broadcast address (it sends to every host on that subnet at once). Neither can be assigned to a device. That means a /24, which has 256 total addresses, only has 254 usable host addresses -- not 256. This is the single most common off-by-two error in manual subnetting.
Why the math gets confusing fast
Each step down in prefix length (say, from /24 to /23) doubles the size of the network, and each step up halves it. Doing this in your head past two or three steps is where mistakes creep in, especially when you also need the actual first-usable and last-usable address, not just the total count.
VLSM (variable-length subnet masking) -- splitting a network into subnets of different sizes to match how many hosts each segment actually needs -- compounds this further, since you are tracking several different prefix lengths at once.
Skip the arithmetic
The subnet host calculator takes a prefix length and gives you the total addresses, usable host count, network address, and broadcast address directly. The CIDR range estimator goes the other direction -- give it a network and prefix, and it returns the full address range, which is useful when you are documenting a network plan or double-checking a firewall rule against the actual boundaries of a subnet.