IP Subnet Calculator

Network address, mask and usable hosts from a CIDR block.

Inputs

Ready when you are

Fill in the values, then press Calculate to see your result.

Preparing today's date…

About IP Subnets

Network address, mask and usable hosts from a CIDR block.

These standards are written down and versioned, so implementations differ in edge cases rather than in substance. Base64 and percent-encoding exist because some channels cannot carry arbitrary bytes, and subnet arithmetic is exact integer work on a 32-bit address.

These follow fixed technical standards rather than local convention: base64 and percent-encoding are defined by RFC, subnets are written in CIDR notation, and electrical values answer to Ohm's law. Because the standards are global, the same input produces the same output anywhere.

An IP subnet splits an address into network and host portions by a mask, and the boundaries are powers of two. Subnetting trades host capacity for network count, and the reserved network and broadcast addresses explain why usable hosts are two fewer than the block size suggests.

Encoding changes how data is written, never what it means — an encoded string is not encrypted and carries no secrecy.

Encoding and addressing are deterministic standards, so the same input produces the same output on every platform, which is what makes them testable. A subnet mask divides an address into network and host portions by arithmetic on the bits rather than by decimal intuition.

IP Subnet Calculator sits with the rest of the library's everyday work, and it rests on the same encoding arithmetic the way a manufacturer's label or a timetable does. Its answer is only as good as the assumptions standing behind it.

The quantities it works from — ip address and prefix length — are the ones a real encoding question actually turns on, and each carries a convention of its own, set out below.

Everyday arithmetic in the United States carries conventions that are easy to miss: dates run month before day, distances and weights follow customary units, and prices are quoted before tax. Those conventions make a surprising share of daily sums come out differently from the same question asked elsewhere.

The figures in this section follow American practice unless the subject itself is international.

More in Everyday

View all