Skip to main content

IPv4 subnet calculator

Calculate network masks, host ranges, and CIDR blocks.

About IPv4 subnet calculator

Work out how an IPv4 address belongs to a CIDR network. The prefix length determines the network portion and the number of remaining address bits.

Steps, example, and limitations

How to use it

  1. Enter an IPv4 address and the required prefix or mask.
  2. Calculate the subnet.
  3. Review the network, broadcast, masks, and host range for your use case.

Example

Input

192.168.1.42/24

Result

Network: 192.168.1.0
Mask: 255.255.255.0
Broadcast: 192.168.1.255

Things to know

  • This calculator covers IPv4, not IPv6.
  • The /31 and /32 cases need special interpretation. A mathematical address range does not tell you which addresses are actually assigned or reachable.

Navigation

Find a tool

Favorites, recent, and quick access

Image compressorReduce image file size with adjustable quality.
JSON formatterFormat, validate, and minify JSON data.
Merge PDFCombine multiple PDF files into one document.
Password generatorGenerate random passwords with configurable character sets.

Preferences

These preferences are saved only in this browser.

Tool input stays in memory and is cleared when you leave the page. Downloaded files are managed by your browser. AI model caches, when used, are separate from these preferences.