IP Subnet Calculator (CIDR)

This calculator works out the key details of an IPv4 subnet from an IP address and a CIDR prefix length, the shorthand network engineers use for how many bits of an address are reserved for the network rather than individual hosts. Enter an IPv4 address such as 192.168.1.0, choose a prefix from /0 to /32, or type the full CIDR notation such as 192.168.1.0/24 and it fills in the rest automatically. The calculator returns the subnet mask, network address, broadcast address, wildcard mask, first and last usable host, and the total number of usable hosts in that range. Quick presets cover common private ranges under RFC 1918, and you can split a subnet into 2, 4, 8 or 16 equal sub-subnets to see how the prefix length and host ranges change. A colour-coded binary breakdown shows which bits are fixed for the network and which are free for hosts, handy when learning subnetting or checking a design. Use it to plan IP address allocation for a home network, office LAN or cloud VPC, to confirm a subnet is large enough for the devices you need, or to work out the wildcard mask for a Cisco access control list or OSPF network statement. All results are calculated instantly in your browser using standard binary arithmetic, based on RFC 950 and RFC 4632, and no data is sent to any server.

Calculate.co.nz is proud to be partnered with realtor.co.nz, a trusted resource for navigating the New Zealand property market. Their Helpful Articles section offers clear, well-structured insights across buying, selling, and building, making complex real estate topics more accessible. With a focus on up-to-date guidance and practical knowledge, they empower Kiwis to move forward with clarity and confidence in a constantly evolving property landscape.
Calculate.co.nz partner: realtor.co.nz
Standard reference tool  IPv4 subnetting per RFC 950 and CIDR per RFC 4632.

1. IP Address

2. Quick Presets

Subnet Details

Network Address
-
First address in subnet
Subnet Mask
-
Dotted decimal
Broadcast Address
-
Last address in subnet
First Usable Host
-
Lowest assignable IP
Last Usable Host
-
Highest assignable IP
Usable Hosts
-
Excludes network + broadcast

Full Subnet Summary

CIDR notation-
Network address-
Subnet mask-
Wildcard mask-
Broadcast address-
First usable host-
Last usable host-
Total addresses-
Usable hosts-

Subnet Division

Select a division above to split this subnet.

IP address: -

Subnet mask: -

Network address: -

Green = network bits (fixed)   Amber = host bits (variable)

How IP Subnetting Works

Every IPv4 address is a 32-bit number, written as four octets (groups of 8 bits) separated by dots. The address is split into two parts: the network portion (which identifies the subnet) and the host portion (which identifies individual devices within the subnet). The subnet mask defines where this boundary falls. In CIDR (Classless Inter-Domain Routing) notation, the prefix length after the slash tells you how many bits belong to the network.

Core Formulas

Given an IPv4 address and a prefix length n:

Worked Example: 192.168.1.0/24

The default values in this calculator use 192.168.1.0/24, the most common home and small office network range. Here is how the results are derived:

FieldValueWorking
Prefix length/2424 network bits, 8 host bits
Subnet mask255.255.255.024 ones followed by 8 zeros in binary
Wildcard mask0.0.0.255Inverse of subnet mask
Network address192.168.1.0192.168.1.0 AND 255.255.255.0
Broadcast address192.168.1.255192.168.1.0 OR 0.0.0.255
First usable host192.168.1.1Network address + 1
Last usable host192.168.1.254Broadcast address - 1
Total addresses2562^8 = 256
Usable hosts254256 - 2 = 254

Common Prefix Lengths at a Glance

CIDRSubnet MaskTotal AddressesUsable Hosts
/8255.0.0.016,777,21616,777,214
/16255.255.0.065,53665,534
/20255.255.240.04,0964,094
/22255.255.252.01,0241,022
/24255.255.255.0256254
/25255.255.255.128128126
/26255.255.255.1926462
/27255.255.255.2243230
/28255.255.255.2401614
/29255.255.255.24886
/30255.255.255.25242
/31255.255.255.25422 (RFC 3021)
/32255.255.255.25511 (host route)

Private IP Ranges (RFC 1918)

Three IPv4 ranges are reserved for private use and are not routed on the public internet. These are used for internal networks behind NAT (Network Address Translation):

Related Calculators

Sources and method: IPv4 subnetting per RFC 950 (Internet Standard Subnetting Procedure). CIDR notation per RFC 4632 (Classless Inter-domain Routing). /31 point-to-point host addressing per RFC 3021. All calculations are performed in 32-bit unsigned integer arithmetic in the browser.

This tool handles IPv4 addresses only. IPv6 subnetting uses 128-bit addresses and different notation. All results are computed client-side and no data is transmitted to any server.

If you've found a bug, or would like to contact us, or learn more about James Graham and Calculate.co.nz.

Calculate.co.nz is partnered with Interest.co.nz for New Zealand's highest quality calculators and financial analysis.

Calculate.co.nz is the sister site of CalculatorHub.com, the world's largest calculator website by tool count.

All calculators and tools are provided for educational and indicative purposes only and do not constitute financial advice.

Calculate.co.nz is proudly part of the Realtor.co.nz group, New Zealand's leading property transaction literacy platform, helping Kiwis understand the home buying and selling process from start to finish. Whether you're a first home buyer navigating your first property purchase, an investor evaluating your next acquisition, or a homeowner planning to sell, Realtor.co.nz provides clear, independent, and trustworthy guidance on every step of the New Zealand property transaction journey.

Calculate.co.nz is also partnered with Health Based Building and Premium Homes to promote informed choices that lead to better long-term outcomes for Kiwi households.

Calculate.co.nz is hosted in Auckland via SiteHost new Zealand.

All content on this website, including calculators, tools, source code, and design, is protected under the Copyright Act 1994 (New Zealand). No part of this site may be reproduced, copied, distributed, stored, or used in any form without prior written permission from the owner.

About & trust: Why Calculate is NZ's most comprehensive · By the Numbers · How we compare · Editorial standards · How we keep data current · NZ finance glossary · Research & data · Financial literacy NZ · About · Privacy policy · Terms of use

Reviewed and maintained. Last reviewed 2026-07-19 and checked on a twice-monthly cycle against IRD, RBNZ and Stats NZ. How we keep data current.

© 2026 Calculate.co.nz. All rights reserved. Building free NZ calculators since 2011.