How to use this tool
- Enter ipv4 address, cidr prefix length.
- Select Update result to view the result.
- Check the method and assumptions below before using the result.
The method, explained
Convert the IPv4 address to a 32-bit integer and apply the prefix mask using bitwise AND. The block contains 2^(32 − prefix) addresses. Conventional subnets reserve the first and last addresses; /31 point-to-point and /32 host routes are handled separately.
Using ipv4 address = 192.168.1.42, cidr prefix length = 24, the result is 192.168.1.0/24. Change these example inputs to match your task; use the method above to check each step.
What to keep in mind
IPv4 only. This arithmetic does not determine address ownership, routing, public reachability or whether every address in the range may be assigned.
Reference: RFC 3021: 31-bit IPv4 point-to-point prefixes
Common questions
Which inputs does this calculation need?
Find an IPv4 network, subnet mask, host range and address count from an address and CIDR prefix. Enter ipv4 address, cidr prefix length. The filled example is editable and is not a saved personal record.
How should I interpret the result?
IPv4 only. This arithmetic does not determine address ownership, routing, public reachability or whether every address in the range may be assigned.
Methodology maintained by ClarityKit. How these tools are built and checked.