IPv4 Subnet Calculator

/
Math Updated 16 Jun 2026

IPv4 Subnet Calculator is a mathematics calculator that helps you calculate ipv4 subnet values from your input data. The formula used is: Subnet Mask: set leftmost CIDR bits to 1, rest to 0\nUsable Hosts = 2^(32−CIDR) − 2\nNetwork = IP AND Mask\nBroadcast = Network OR ~Mask. Ensure all inputs share the same unit system (e.g. all metres or all feet) unless the formula converts between units.

Formula

Subnet Mask: set leftmost CIDR bits to 1, rest to 0 Usable Hosts = 2^(32−CIDR) − 2 Network = IP AND Mask Broadcast = Network OR ~Mask

Example Calculation

Inputs
  • IP Octet 1: 192
  • IP Octet 2: 168
  • IP Octet 3: 1
  • IP Octet 4: 0
  • CIDR Prefix: 24 /

Suppose you enter: IP Octet 1 = 192, IP Octet 2 = 168, IP Octet 3 = 1, IP Octet 4 = 0, CIDR Prefix = 24. The calculator applies the formula (Subnet Mask: set leftmost CIDR bits to 1, rest to 0\nUsable Hosts = 2^(32−CIDR) − 2\nNetwork = IP AND Mask\nBroadcast = Network OR ~Mask) and shows all output values below. Change any input field to immediately see how the result changes.

Frequently asked questions

What is the IPv4 Subnet?
The IPv4 Subnet Calculator is a mathematics calculator that helps you calculate ipv4 subnet values from your input data. Ensure all inputs share the same unit system (e.g. all metres or all feet) unless the formula converts between units.
When should I use this calculator?
Use this calculator whenever you need a quick, accurate result for ipv4 subnet values from your input data without working through the arithmetic manually.
What units should I enter?
Ensure all inputs share the same unit system (e.g. all metres or all feet) unless the formula converts between units.
How accurate are the results?
Results are mathematically exact given the formula and your inputs. Rounding to decimal places may introduce small display differences.
How do I interpret the result?
Check that all inputs are in the valid range for the formula. Some operations (e.g. square root, division) require non-negative or non-zero values.
How can I verify the calculation manually?
Use the displayed formula and work through the numbers step by step. If your manual result differs slightly, check rounding and unit conversions first.
Can I use this for planning and budgeting?
Yes. Run best-case, expected, and worst-case inputs to compare outcomes and make safer planning decisions.