How the IP Subnet Calculator works.
network = address bitwise-AND prefix maskThe address is parsed as 32 bits for IPv4 or 128 bits for IPv6; prefix length retains the leading network bits.
Worked example for the IP Subnet Calculator.
IPv4 address 192.168.1.42 with prefix 24 has network 192.168.1.0, broadcast 192.168.1.255, and 256 total addresses.
How to read this result.
The result applies a CIDR prefix mask to an IPv4 or IPv6 address and reports the canonical network boundary and address scope.
How this tool gets the answer
network = address bitwise-AND prefix mask. The address is parsed as 32 bits for IPv4 or 128 bits for IPv6; prefix length retains the leading network bits. The result applies a CIDR prefix mask to an IPv4 or IPv6 address and reports the canonical network boundary and address scope.
A useful example
IPv4 address 192.168.1.42 with prefix 24 has network 192.168.1.0, broadcast 192.168.1.255, and 256 total addresses. A quick way to verify the calculation is: Parse the address into an unsigned integer, keep the prefix bits with a bit mask, clear host bits, and format the network in its original address family.
What the result tells you
The result applies a CIDR prefix mask to an IPv4 or IPv6 address and reports the canonical network boundary and address scope. An IPv4 prefix ranges from 0 to 32 bits; an IPv6 prefix ranges from 0 to 128 bits. CIDR is bit-based and has no decimal unit.
Where the answer can go wrong
Every IPv4 octet must be decimal 0–255. IPv6 accepts valid compressed hexadecimal notation but rejects multiple double-colon contractions and zone identifiers. The calculator describes address mathematics only; routing policy, delegated prefixes, DHCP reservations, firewall behavior, and provider assignments are external.
Privacy and practical use
Address parsing happens locally. No entered address is transmitted or stored. Keep the source value and its unit with any result you save so you can reproduce the calculation later.
Inputs and edge cases to check.
Every IPv4 octet must be decimal 0–255. IPv6 accepts valid compressed hexadecimal notation but rejects multiple double-colon contractions and zone identifiers.
What this tool does not include.
The calculator describes address mathematics only; routing policy, delegated prefixes, DHCP reservations, firewall behavior, and provider assignments are external.
Reference guidance and methodology.
IP Subnet Calculator questions.
What does the IP Subnet Calculator do?
Validate an IPv4 or IPv6 address and calculate its CIDR network boundary and scope.
How can I check the result?
Parse the address into an unsigned integer, keep the prefix bits with a bit mask, clear host bits, and format the network in its original address family.
Which units and assumptions matter?
An IPv4 prefix ranges from 0 to 32 bits; an IPv6 prefix ranges from 0 to 128 bits. CIDR is bit-based and has no decimal unit. The calculator describes address mathematics only; routing policy, delegated prefixes, DHCP reservations, firewall behavior, and provider assignments are external.
Are the entered values sent or stored?
Address parsing happens locally. No entered address is transmitted or stored.