Skip to main content

Network Mask Calculator

Calculate an IPv4 network from CIDR notation (192.168.1.0/24) or an address plus a dotted subnet mask (192.168.1.0 255.255.255.0). Returns the network and broadcast addresses, subnet and wildcard masks, CIDR notation, usable host range, total and usable host counts, the IP class and the binary subnet mask.

Input

Enter CIDR notation ("192.168.1.0/24") or an address followed by a dotted subnet mask ("192.168.1.0 255.255.255.0").

Output

Network Details
PropertyValue
No data yet
Was this helpful?

Guides

The Network Mask Calculator turns an IPv4 address and its network size into every detail engineers need to plan or troubleshoot a subnet: the network and broadcast addresses, the subnet and wildcard masks, canonical CIDR notation, the usable host range, the total and usable host counts, the classful IP class, and the binary form of the subnet mask.

How to use it

Type a network into the input using either format:

  • CIDR notation — an address followed by a slash and a prefix length, e.g. 192.168.1.0/24.
  • Address plus dotted subnet mask — an address, a space, then the mask, e.g. 192.168.1.0 255.255.255.0.

The results update as you type. Copy the table or download it as CSV from the output toolbar.

What the fields mean

  • Network Address — the first address in the block, identifying the subnet itself.
  • Broadcast Address — the last address, used to reach every host at once.
  • Subnet Mask / Wildcard Mask — the mask that separates network bits from host bits, and its bitwise inverse (used in ACLs and OSPF).
  • Usable IP Range — the addresses assignable to hosts, i.e. everything between the network and broadcast addresses.
  • Total Addresses / Usable Hosts — the full count of addresses in the block, and how many can be assigned to devices.
  • IP Class — the legacy classful class (A/B/C/D/E) derived from the first octet. Classful addressing is deprecated in favour of CIDR, but the class is still handy as a quick sanity check.
  • Binary Mask — the subnet mask written as four 8-bit binary octets.

How are /31 and /32 handled?

They are special-cased so the counts are correct. A /32 is a single-host route: one address, one usable host, with no separate broadcast. A /31 is a point-to-point link per RFC 3021: two addresses, and both are usable — there is no network/broadcast reservation on a two-address link. For every other prefix the network and broadcast addresses are reserved, so usable hosts equals the total minus two.

Does it validate the subnet mask?

Yes. When you supply a dotted mask, it must be a valid contiguous netmask — all 1-bits followed by all 0-bits (e.g. 255.255.240.0). A non-contiguous value such as 255.0.255.0 is rejected rather than silently mis-interpreted.

Privacy

All calculations run entirely in your browser. Nothing you enter is uploaded or stored.

ipipv4subnetmasknetmaskcidrnetworkwildcardbroadcastbinary

Use it from code

From 3 credits per call

REST API

curl -X POST https://api.iotools.cloud/v1/tool/network-mask-calculator \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "input": "192.168.1.0/24"
  }'

Swap in your own key from your account. The tool's fields are the body — no wrapper.

Ask an AI agent

Use the IOTools `network-mask-calculator` tool (Network Mask Calculator) on this input:

YOUR_INPUT_HERE

Paste this at any agent connected to the IOTools MCP server, then add your input.

Love the tools? Lose the ads.

One payment clears every ad from your account, for good. No subscription, no tracking.