Enter an IP address and CIDR prefix length to calculate the network address, broadcast address, subnet mask, wildcard mask, usable host range, and total host count. Supports all IPv4 prefix lengths from /0 to /32.
Type a CIDR block above to auto-fill the IP and prefix fields, or use the fields on the left directly.
----Network bits are fixed (shown by the mask). Host bits vary to form individual addresses within the subnet.
-
| Prefix | Subnet Mask | Total Addresses | Usable Hosts | Class Equiv. |
|---|---|---|---|---|
| /8 | 255.0.0.0 | 16,777,216 | 16,777,214 | Class A |
| /16 | 255.255.0.0 | 65,536 | 65,534 | Class B |
| /24 | 255.255.255.0 | 256 | 254 | Class C |
| /25 | 255.255.255.128 | 128 | 126 | Half C |
| /26 | 255.255.255.192 | 64 | 62 | Quarter C |
| /27 | 255.255.255.224 | 32 | 30 | Eighth C |
| /28 | 255.255.255.240 | 16 | 14 | Sixteenth C |
| /29 | 255.255.255.248 | 8 | 6 | 1/32 C |
| /30 | 255.255.255.252 | 4 | 2 | Point-to-point |
| /31 | 255.255.255.254 | 2 | 2 (RFC 3021) | P2P only |
| /32 | 255.255.255.255 | 1 | 1 (host route) | Single host |
CIDR (Classless Inter-Domain Routing) notation expresses an IPv4 address and its network prefix as a single string: the address, a slash, and the prefix length. The prefix length specifies how many of the 32 bits in the address identify the network. The remaining bits identify individual hosts within that network.
For example, 192.168.1.0/24 means the first 24 bits (192.168.1) are the network portion and the last 8 bits are the host portion. This gives 2^8 = 256 total addresses, of which 254 are usable (the network address 192.168.1.0 and broadcast address 192.168.1.255 are reserved).
Given an IP address and prefix length n:
With IP 192.168.1.0 and prefix /24:
| Field | Value |
|---|---|
| Subnet mask | 255.255.255.0 |
| Wildcard mask | 0.0.0.255 |
| Network address | 192.168.1.0 |
| Broadcast address | 192.168.1.255 |
| First usable host | 192.168.1.1 |
| Last usable host | 192.168.1.254 |
| Total addresses | 256 (2^8) |
| Usable hosts | 254 |
The calculator above shows exactly these values when you use the default inputs.
Three IPv4 address ranges are reserved for private use and are not routed on the public internet:
Most home and office networks use addresses from these ranges. Network address translation (NAT) maps private addresses to one or more public IP addresses for internet access.
You can divide any CIDR block into smaller subnets by increasing the prefix length. Each additional bit doubles the number of subnets and halves the number of hosts per subnet. For example, a single /24 (256 addresses) can be split into two /25 subnets (128 addresses each), four /26 subnets (64 addresses each), and so on. This is used in network design to segment traffic, apply different security policies to different parts of a network, and make efficient use of IP address space.
Sources / method: RFC 4632 "Classless Inter-domain Routing (CIDR): The Internet Address Assignment and Aggregation Plan". RFC 1918 "Address Allocation for Private Internets". RFC 3021 "Using 31-Bit Prefixes on IPv4 Point-to-Point Links". All arithmetic is standard IPv4 bitwise operations.
This calculator covers IPv4 addresses only. IPv6 uses 128-bit addresses and different notation conventions. Results are mathematically exact for the inputs provided.
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-02 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.