IPv4 Subnet Calculator
Calculate network address, broadcast, host range, and subnets from any CIDR or netmask in IPv4.
IPv4 Subnet Calculator Tool
How to use the IPv4 subnet calculator
Enter your network
Type a CIDR like 192.168.1.0/24 or an IP with netmask like 10.0.0.0 255.255.255.0 — both forms work and auto-detect.
Read the breakdown
The dark result card shows the network address, broadcast, first and last usable host, total host count, netmask, wildcard mask, binary representation, and class/private classification.
Copy what you need
Every field has a Copy button. The CIDR is copy-ready in the format most cloud consoles (AWS VPC, GCP, DigitalOcean, AlibabaCloud) accept directly.
Try the presets
The pills under the input cover the three RFC 1918 private ranges, CGNAT 100.64.0.0/10, and a sample Singapore APNIC public allocation so you can see how each behaves.
IPv4 subnetting — the math behind the netmask
An IPv4 address is a 32-bit number. We write it in the friendly "dotted-quad" form (192.168.1.42) but underneath it is just four bytes packed in a row. The netmask — also 32 bits — is what tells the routing layer which part of those bits is the network identifier and which part is the host identifier. The CIDR notation /24 means "the first 24 bits are network, the last 8 bits are host" — equivalent to a netmask of 255.255.255.0. Every subnet calculation is a deterministic application of bitwise AND, OR and NOT against that mask.
Why CIDR replaced classes
Before 1993, IPv4 was split into rigid "classes" — Class A used the first byte for the network (16 million hosts each), Class B used two bytes, Class C used three. The problem was waste: a company that needed 500 IP addresses was given a full Class B (65,534 hosts) because Class C maxed out at 254. CIDR — Classless Inter-Domain Routing — broke the rigid boundaries and let networks be sized to any power of two. A /22 carved out 1,022 usable hosts, exactly fitting that 500-user company without the wasted 65,000 addresses. CIDR is why IPv4 has survived as long as it has.
The three private ranges and CGNAT
RFC 1918 reserves three IPv4 ranges for private use — addresses that won't be routed on the public internet. They are 10.0.0.0/8 (the giant one, used by most corporate networks), 172.16.0.0/12 (Docker's default for many setups), and 192.168.0.0/16 (home routers). In 2012, RFC 6598 added a fourth range — 100.64.0.0/10 — specifically for Carrier-Grade NAT (CGNAT), where ISPs share one public IP among many subscribers. If your Singapore or Malaysian home broadband shows an IP starting with 100.64-127, you are behind CGNAT — your ISP didn't give you a dedicated public IP, and incoming connections won't reach you without a relay or IPv6.
Singapore and APNIC allocations
The five regional internet registries (RIRs) allocate IPv4 blocks to ISPs. Singapore, Malaysia, Indonesia, Thailand, and the rest of Asia-Pacific are served by APNIC (apnic.net), headquartered in Brisbane. APNIC's allocations to Singapore-based ISPs typically come from the 203.116.0.0/16, 202.157.0.0/16, and 118.200.0.0/16 ranges, among others. When you whois a Singapore IP, the netname will often start with SG- and the org will be SingTel, StarHub, M1, or a smaller ISP. APNIC ran out of fresh /8 allocations from IANA in 2011; new allocations to ASEAN ISPs since then have come from recycled space or IPv6.
Why the broadcast and network can't be used
In a /24 like 192.168.1.0/24, the addresses .0 and .255 are reserved. The all-zeros host part (.0) is the network identifier — used by routers to refer to the subnet itself. The all-ones host part (.255) is the broadcast address — packets sent there are delivered to every host on the subnet. That's why a /24 has 256 total addresses but only 254 usable host addresses. Point-to-point /31 links and modern host-routes (/32) are the exceptions where this convention is relaxed by RFC 3021 — useful trivia for network engineers but not relevant for typical home or office subnets.
Picking the right prefix length
The rule of thumb: count hosts, round up to the next power of two, then add two for network and broadcast. A team of 50 servers? Round to 64, that's a /26 (64 addresses, 62 usable). A new VPC on AWS for a startup? /16 gives you 65,534 addresses — overkill, but cheap to provision and lets you sub-divide later. Avoid the temptation to be parsimonious early; the cost of re-IP'ing later is hours of downtime, the cost of provisioning a /16 today is zero.
10 IPv4 subnetting facts
IPv4 has exactly 4,294,967,296 addresses (2³²). The total internet population has exceeded that for over a decade — NAT and CGNAT are why the system still works.
CIDR notation was introduced in RFC 1519 in 1993 and immediately made class-based addressing obsolete. The "Class A/B/C" terminology lingers but no modern router cares about it.
The largest single private network you can build is 10.0.0.0/8 — 16,777,214 usable hosts. Most enterprise networks use only a fraction.
APNIC, the regional registry for Asia-Pacific including Singapore and Malaysia, ran out of fresh /8 allocations from IANA in 2011 — earlier than any other RIR.
CGNAT (100.64.0.0/10) is now standard for most Singapore and Malaysian residential broadband. The address looks public but isn't routable from outside your ISP.
A /31 subnet has only 2 addresses and no network/broadcast convention — RFC 3021 specifically allows both to be host addresses on point-to-point links.
The loopback range 127.0.0.0/8 contains 16 million addresses — but only 127.0.0.1 is universally used. The rest are technically usable on most operating systems.
The wildcard mask (the bitwise NOT of the netmask) is used by Cisco ACLs and OSPF. 0.0.0.255 means "match the first three octets, ignore the last."
The IPv4 multicast range is 224.0.0.0/4 — addresses 224 through 239. Streaming protocols, mDNS (.local resolution), and some routing protocols live here.
AWS reserves the first 4 and last 1 address in every VPC subnet (not just network + broadcast). A /28 VPC subnet gives you 11 usable IPs, not 14.
Frequently asked questions
/24 in CIDR is identical to 255.255.255.0 as a netmask — the CIDR number is the count of leading 1-bits in the binary mask. CIDR is shorter; netmask is what older equipment expects.100.64.0.0/10 identifies CGNAT space. If your home router's WAN IP starts with 100.64–100.127, you're behind CGNAT. Most Singapore and Malaysian residential broadband is now CGNAT by default.10.0.0.0/8 is the largest reserved range — 16,777,214 usable hosts. For public use, it depends on what your registry allocates you — APNIC typically gives ASEAN ISPs /20 to /22 blocks today.0.0.0.255 means "match the first three octets, anything in the last." It's mathematically equivalent to a /24 netmask of 255.255.255.0.Related News
You may be interested in these recent stories from our newsroom.
-
NEXTDC Opens Peninsular Malaysia's First Tier IV Data Centre with RM2.8 Billion KL1 Launch in Petaling Jaya
NEXTDC officially opened KL1 in Petaling Jaya on 14 May 2026 — an AUD$1 billion facility that holds Peninsular Malaysia's first Uptime Insti...
-
Indonesia's INA Locks In 30% Annual Allocation for AI and Data Centre Infrastructure
Indonesia's sovereign wealth fund INA has formalised a 30% annual cap on digital sector deployment, anchored by a joint venture with Singapo...
-
Microsoft Build 2026: Project Polaris Cuts Copilot's OpenAI Dependency, Copilot Workspace Ships to GA
Microsoft confirmed at Build 2026 in San Francisco that GitHub Copilot will run on Project Polaris — its own mixture-of-experts coding model...
75 more free tools
Calculators, converters, security tools — no signup.