IPv4 CIDR Subnet Calculator
Pricing
$1.00 / 1,000 results
IPv4 CIDR Subnet Calculator
Calculate IPv4 CIDR subnet ranges, network and broadcast addresses, subnet masks, usable IP addresses, and host counts for networking, DevOps, infrastructure automation, and firewall configuration.
Pricing
$1.00 / 1,000 results
Rating
0.0
(0)
Developer
Ask4Favour
Maintained by CommunityActor stats
0
Bookmarked
2
Total users
1
Monthly active users
6 days ago
Last modified
Categories
Share
This IPv4 CIDR subnet calculator converts CIDR notation into a network address, broadcast address, subnet mask, usable IP range, and host count. Enter an IPv4 address with a prefix, such as 192.168.1.10/24, or calculate multiple subnets in an ordered batch with structured JSON results for scripts and AI agents.
All calculations are deterministic and run inside the Actor without contacting external IP lookup services.
CIDR to IP range, subnet mask, and host count
Convert CIDR to an IP address range
For 192.168.1.10/24, the complete IP range is 192.168.1.0 through 192.168.1.255; the usable host range is 192.168.1.1 through 192.168.1.254. The canonical network CIDR is 192.168.1.0/24, even when the input contains a host address.
Find the subnet mask and usable host count
Use the subnet mask calculator to translate a prefix length into dotted-decimal notation and check subnet capacity:
| CIDR prefix | Subnet mask | Total addresses | Usable hosts |
|---|---|---|---|
/24 | 255.255.255.0 | 256 | 254 |
/27 | 255.255.255.224 | 32 | 30 |
/30 | 255.255.255.252 | 4 | 2 |
These are standard IPv4 host counts; cloud providers may reserve additional addresses.
Subnet planning for DevOps, firewalls, and IP address management
- Plan AWS VPC, Azure VNet, Google Cloud, Kubernetes, and on-premises subnets.
- Check whether a subnet has enough usable IP addresses for servers or devices.
- Convert CIDR notation into IP ranges for firewall rules and access control lists.
- Validate network and broadcast addresses during infrastructure automation.
- Add deterministic IPv4 calculations to DevOps workflows, scripts, and AI agents.
- Process multiple CIDR blocks for IP address management and network audits.
How to calculate an IPv4 subnet
- Open the Actor in Apify Console.
- Enter an IPv4 address followed by a CIDR prefix, such as
192.168.1.10/24. - Click Start.
- Open the run's Dataset to view or download the calculated subnet data.
Provide one of these input fields:
The input form prefills 192.168.1.10/24; clear it when using cidrs for a batch. If both fields are omitted (including input {}), the Actor calculates this example subnet automatically.
| Field | Type | Description |
|---|---|---|
cidr | string | One IPv4 address with a /0–/32 prefix, such as 10.0.0.5/24 |
cidrs | string array | Multiple IPv4 CIDRs to calculate as an ordered batch |
Single CIDR input
{"cidr": "192.168.1.10/24"}
Batch IPv4 subnet calculations
Submit an array to calculate multiple IPv4 subnets in the same order:
{"cidrs": ["192.168.1.10/24","10.0.0.1/30","172.16.5.100/16"]}
IPv4 subnet calculator output
Each input CIDR produces one item in the default dataset:
{"input": "192.168.1.10/24","networkAddress": "192.168.1.0","broadcastAddress": "192.168.1.255","subnetMask": "255.255.255.0","firstUsableHost": "192.168.1.1","lastUsableHost": "192.168.1.254","totalAddresses": 256,"usableHostCount": 254,"canonicalNetworkCidr": "192.168.1.0/24"}
| Field | Description |
|---|---|
input | Original IPv4 CIDR submitted to the Actor |
networkAddress | First address in the subnet |
broadcastAddress | Last address in the subnet |
subnetMask | Dotted-decimal IPv4 subnet mask |
firstUsableHost | First usable host address |
lastUsableHost | Last usable host address |
totalAddresses | Total number of addresses in the CIDR block |
usableHostCount | Number of usable host addresses |
canonicalNetworkCidr | Normalized network address and prefix |
error | Validation error code and message for an invalid batch entry |
index | Zero-based position of an invalid entry in a batch |
IPv4 /31 and /32 subnet calculation examples
The Actor accepts IPv4 CIDR notation only; IPv6 is not supported. Prefixes /0 through /30 reserve the network and broadcast addresses, /31 treats both addresses as usable according to RFC 3021, and /32 represents one host address.
| Input | Network | Broadcast | First usable | Last usable | Total | Usable |
|---|---|---|---|---|---|---|
10.0.0.0/31 | 10.0.0.0 | 10.0.0.1 | 10.0.0.0 | 10.0.0.1 | 2 | 2 |
8.8.8.8/32 | 8.8.8.8 | 8.8.8.8 | 8.8.8.8 | 8.8.8.8 | 1 | 1 |
Invalid CIDR input and batch errors
IPv6 addresses, missing prefixes, and prefixes outside /0–/32 are unsupported. Apify validates inputs against the input schema before starting a run.
Invalid entries that reach the calculator produce structured error items. In a batch, valid entries are still calculated and retain their input order, but the Actor run finishes with a nonzero status if any entry is invalid.