CalcaTools

IP Subnet Calculator | Show Mask, Network, Hosts, and Broadcast

Breaks an IP address and CIDR prefix into its full subnet details. Enter an address like 192.168.1.0/24, and the tool returns the subnet mask, wildcard mask, network address, broadcast address, usable host range, and total host count. A quick reference for network setup and firewall rules.

Last updated: June 2026 · Free · No sign-up required

Results

Enter values above and click Calculate to see your result instantly.

Quick reference

CIDR to mask and hosts:

CIDRSubnet maskUsable hosts
/24255.255.255.0254
/25255.255.255.128126
/26255.255.255.19262
/27255.255.255.22430
/30255.255.255.2522

edit_note What you need

Have your numbers ready before you start. The form above shows the exact fields required, with units and example values for each. Any blank or out-of-range field is flagged before the result is computed so you never get a misleading answer.

function How it computes

The IP subnet calculator applies the published reference formula and rounds the result to a useful precision. The methodology section below explains each step so you can verify the math.

verified Trusted source

Reference values and constants come from an authoritative source. Every quarter we re-check the source and update the calculator if the published guidance changes. The link is visible in the methodology section so you can verify it yourself.

tips_and_updates Read it like this

Read the headline number first, then open the breakdown card to see how each input contributed. If a result looks off, the breakdown almost always shows which value drove it. Adjust that input and recalculate — the answer updates instantly.

Interpretation guide

Subnet terms:

TermMeaning
Network addressFirst address in the block
Broadcast addressLast address in the block
Usable hostsTotal minus network and broadcast
CIDR prefixNumber of network bits

lightbulb Worked example

Let's say you are using the IP Subnet Calculator. Breaks an IP address and CIDR prefix into its full subnet details. Enter an address like 192.168.1.0/24, and the tool returns the subnet mask, wildcard mask, network address, broadcast address, Enter the values that match your situation into the input fields and press calculate — using realistic numbers makes the result directly useful for you.

Result: The calculator instantly applies the formula Total addresses = 2^(32 - prefix); usable hosts = total - 2 (network + broadcast) and returns the result with appropriate precision.

What this means: Read the result in the context of what you are measuring. The step-by-step breakdown lets you confirm the math and understand which input most affects the outcome.

Formula & methodology

Formula: Total addresses = 2^(32 - prefix); usable hosts = total - 2 (network + broadcast)

The IP Subnet Calculator is built on a well-established calculation method. It uses the formula Total addresses = 2^(32 - prefix); usable hosts = total - 2 (network + broadcast) to turn your inputs into a reliable result. Breaks an IP address and CIDR prefix into its full subnet details. Enter an address like 192.168.1.0/24, and the tool returns the subnet mask, wildcard mask, network address, broadcast address, usable host range, and The steps are shown on the page so you can follow the reasoning from input to output.

The calculator takes an IPv4 address and CIDR prefix and returns the subnet mask, network and broadcast addresses, the usable host range, and host count. The prefix is the number of network bits; the remaining bits address hosts, so total addresses equal 2^(32 - prefix). Two addresses are reserved (network and broadcast), leaving the usable count. This is essential for planning networks and sizing subnets.

What is the IP Subnet Calculator?

The IP Subnet Calculator is a free, browser-based developer tool tool that helps you Breaks an IP address and CIDR prefix into its full subnet details. Enter an address like 192.168.1.0/24, and the tool returns the subnet mask, wildcard mask, ne. Instead of working through the math by hand or in a spreadsheet, you enter your values and the calculator returns an accurate result instantly — while still showing the formula and the steps so you can verify the reasoning. It is designed for quick everyday use: no sign-up, no installation, and everything runs locally in your browser for complete privacy.

How to use the IP Subnet Calculator

  1. Enter the required values into the input fields.
  2. Press the calculate button — the result appears immediately, updated live as you change any value.
  3. Read the step-by-step breakdown below the result to see exactly how the calculation was performed.
  4. Use the interpretation guide to understand what the result means for your situation, and try different inputs to see how they change the outcome.

How to use the IP Subnet Calculator

Enter an IP address with its CIDR prefix, such as 192.168.1.0/24, and the tool computes the complete subnet details. It applies Total addresses = 2^(32 − prefix) and usable hosts = total − 2 (network and broadcast addresses are reserved). For a /24, that means 256 total addresses and 254 usable hosts. The result includes the subnet mask, wildcard mask, network address, broadcast address, and the usable host range.

Interpreting your result

The network address is the first address of the block — it identifies the subnet itself and can never be assigned to a host. The broadcast address is the last one — traffic sent to it reaches every host on the subnet. The usable range in between is what you can assign to devices: for 192.168.1.0/24, hosts use 192.168.1.1 through 192.168.1.254. The prefix length tells the story: each smaller prefix number doubles the address space, so /23 has 512 addresses and /22 has 1,024, while larger prefixes like /30 (4 addresses, 2 usable) are used for point-to-point links.

Common mistakes to avoid

The most common error is counting the network and broadcast addresses as usable — a /30 link has only 2 usable addresses, not 4. Second, confusing the subnet mask with the wildcard mask: the wildcard is the bitwise inverse (255.255.255.0 becomes 0.0.0.255). Third, misreading the prefix: /24 is not '24 addresses' but 2^(32−24) = 256. Finally, overlapping subnets — two ranges that share addresses cause routing chaos, so always check the network and broadcast of each block before assigning.

Tips for best results

Use the tool when planning VLANs or VPN pools: size each subnet to its actual device count plus 20% headroom. For point-to-point links use /30 or /31, for small offices /24, and for large campuses /16 or shorter. Document every subnet's network, broadcast, and usable range — the calculator output is ready for that spreadsheet. When combining subnets, remember they can only be merged if they are aligned to the larger block's boundary. Verify any externally documented CIDR by entering it here before configuring firewalls or route tables.

Authoritative source: MDN Web Docs

Frequently asked questions

How many hosts are in a /24?
The IP Subnet Calculator is free, private, and accurate: it runs entirely in your browser (no uploads, no accounts), applies the standard calculation, and explains each step so you can verify the result. Breaks an IP address and CIDR prefix into its full subnet details. Enter an address like 192.168.1.0/24, and the tool returns the subnet mask, wildcard mask, network address, broadcast address, usable host range, and total host count. A quick reference for There is no limit on usage, and it works on any device.
How do I convert CIDR to a subnet mask?
Enter the required values into the input fields and press the calculate button. The tool applies the formula Total addresses = 2^(32 - prefix); usable hosts = total - 2 (network + broadcast) and returns the result with a short explanation of each step, so you can check the working yourself.
What are the network and broadcast addresses?
The network address is the first address of the subnet — the base of the block, never assigned to a host; the broadcast address is the last — traffic sent there reaches every host in the subnet. For 192.168.1.0/24, the network is 192.168.1.0 and the broadcast 192.168.1.255, leaving 192.168.1.1–254 usable. Both are derived from the prefix length: total addresses = 2^(32 − prefix).
How do I calculate usable hosts?
Compute the total addresses as 2^(32 − prefix), then subtract 2 for the network and broadcast addresses: a /24 gives 256 − 2 = 254 usable hosts, and a /30 gives 4 − 2 = 2 usable (the classic point-to-point link size). The calculator does this automatically from any CIDR prefix you enter.
What is a /30 subnet used for?
The IP Subnet Calculator is a free online tool that breaks an ip address and cidr prefix into its full subnet details. enter an address like 192.168.1.0/24, and the tool returns the subnet mask, wildcard mask, network address, broadcast address, usable host range, and total host count. a quick reference for. You enter a few values, and it returns an accurate result together with a step-by-step explanation, so it works as both a calculator and a quick reference for the underlying concept.
What does the IP Subnet Calculator do?
Breaks an IP address and CIDR prefix into its full subnet details. Enter an address like 192.168.1.0/24, and the tool returns the subnet mask, wildcard mask, network address, broadcast address, usable host range, and total host count. A quick reference for. The calculator takes your inputs, applies the standard calculation, and returns a clear result so you can make an informed decision without doing the math by hand.
What formula does the IP Subnet Calculator use?
It computes Total addresses = 2^(32 − prefix) and usable hosts = total − 2 (network + broadcast addresses). Enter an address and CIDR prefix like 192.168.1.0/24 and the tool returns the subnet mask, wildcard mask, network address, broadcast address, and usable host range. A /24 has 256 addresses and 254 usable hosts.
Is the IP Subnet Calculator free and private?
Yes — the IP Subnet Calculator. There is no sign-up, no paywall, no trial, and no limit on how many calculations you can run. CalcaTools covers its costs with non-intrusive display advertising, so the calculator itself never asks for payment or restricts any feature.
How accurate is the IP Subnet Calculator?
The IP Subnet Calculator applies the standard formula: Total addresses = 2^(32 - prefix); usable hosts = total - 2 (network + broadcast). It is tested against published worked examples before launch and uses native double-precision arithmetic, so results are accurate to typical precision for the values you enter — with no intermediate rounding that could distort the answer.

Explore the full developer toolkit

Every CalcaTools developer tool — encoders, formatters, generators, regex, JSON, and API utilities — built for the browser.