Type an address with a prefix length, like 192.168.1.10/24 or 2001:db8::1/64, and get the network, host range, and masks, plus the Linux commands that use them.
The number after the slash is how many leading bits identify the network; the rest identify hosts. A /24 leaves 8 host bits, so 256 addresses, of which 254 are usable because the first is the network address and the last is broadcast. Each step down in prefix doubles the size: /23 is 512 addresses, /22 is 1024. Point-to-point /31 links use both addresses (RFC 3021) and a /32 is a single host. IPv6 has no broadcast, and almost every LAN is a /64, so stateless autoconfiguration works; do not subnet a LAN smaller than that.
This subnet calculator works out everything you need from a CIDR block: the network and broadcast addresses, the first and last usable host, the dotted netmask and wildcard mask used by older tools and ACLs, the number of addresses, and whether the range is private, carrier-grade NAT, loopback, link-local, or public. It handles IPv6 too, compressing addresses correctly, and can split an IPv4 network into equal smaller subnets for VLAN or VPN planning. Everything runs in your browser.
They describe the same thing. A /24 prefix and the netmask 255.255.255.0 both mean the first 24 bits are the network. Modern tools like ip and netplan use the prefix form; older configuration files and some firewalls still want the dotted mask.
RFC 1918 reserves 10.0.0.0/8, 172.16.0.0/12, and 192.168.0.0/16 for private networks. 100.64.0.0/10 is carrier-grade NAT space, which Tailscale also uses for its addresses. None of these are routed on the public internet.
The inverse of the netmask: 0.0.0.255 for a /24. Some router ACLs and OSPF configurations use it to say which bits may vary. Linux tools almost never need it.
Run ip -brief address. Each interface shows its addresses in CIDR form, which you can paste straight into this calculator.