Professional IPv4 IP & subnet calculator. Enter an IP and prefix or mask to get network, broadcast, host range, wildcard mask, class, and private/public status. Includes formulas, glossary, worked example, and FAQs.
IPv4 Calculator
Full original guide (expanded)
ip calculator
A precise IPv4 subnet tool for engineers, students, and IT pros. Enter an IP and prefix (or mask) to get the
network, broadcast, host range, class, wildcard mask, and private/public status — with formulas and a worked example.
Enter four octets (0–255) separated by dots, e.g., 10.0.0.1.
/n where n is the number of 1-bits in the subnet mask (0–32). Example: /24 = 255.255.255.0.
Dotted-decimal mask. If provided, this will overwrite the prefix length after validation.
Results
Network
—
Broadcast
—
First Host
—
Last Host
—
Total Hosts
—
Usable Hosts
—
Subnet Mask
—
Wildcard Mask
—
Class
—
Private / Public
—
Binary & Hex view
IP (bin / hex)
—
Mask (bin / hex)
—
Authoritative Data Source & Methodology
Primary sources:
IETF RFC 791 (Internet Protocol) – Sept 1981
IETF RFC 950 (Internet Standard Subnetting Procedure) – Aug 1985
IETF RFC 4632 (Classless Inter-domain Routing, CIDR) – Aug 2006
All calculations strictly derive from the definitions and procedures in these RFCs. “Tutti i calcoli si basano rigorosamente sulle formule e sui dati forniti da questa fonte.”
The Formula Explained
Let prefix be \( p \) (0–32). Subnet mask has \( p \) ones followed by \( 32-p \) zeros.
IP: IPv4 address (32-bit integer rendered as dotted decimal).
Prefix /p: Count of 1-bits in mask.
Subnet mask: 32-bit bitmask; ones for network, zeros for host.
Wildcard mask: Bitwise NOT of subnet mask.
Network: Bitwise AND of IP and mask.
Broadcast: Network OR wildcard.
Total hosts: All addresses in the subnet.
Usable hosts: Excludes network and broadcast when applicable.
How It Works: A Step-by-Step Example
Suppose IP = 192.168.1.10, prefix = /24.
\( p=24 \Rightarrow N = 2^{8} = 256 \) addresses; \( U = 256-2 = 254 \) usable.
Mask = 255.255.255.0. Wildcard = 0.0.0.255.
Network = 192.168.1.0; Broadcast = 192.168.1.255.
First host = 192.168.1.1; Last host = 192.168.1.254.
FAQ
What’s the difference between prefix and subnet mask?
The prefix (e.g., /24) is the count of 1-bits in the mask. The mask is the dotted-decimal representation of those bits (e.g., 255.255.255.0).
Why are network and broadcast not usable?
They identify the subnet itself (all host bits 0) and the broadcast address (all host bits 1). In point-to-point /31 and loopback /32 scenarios, special rules apply.
Is my address private?
Private ranges per RFC 1918: 10/8, 172.16/12, 192.168/16. The calculator flags these.
Do /31 subnets have usable hosts?
On point-to-point links, /31 uses both addresses and omits broadcast (RFC 3021). This tool reports usable hosts accordingly (0 traditional, but both addresses usable on P2P).
Does this support IPv6?
This page focuses on IPv4. Use a dedicated IPv6 calculator for 128-bit addressing and different rules.
What is the wildcard mask used for?
It’s the inverse of the subnet mask, commonly used in ACLs and some router configurations to match address ranges.
How is “class” determined?
Legacy classful ranges based on the first octet: A (0–127), B (128–191), C (192–223). Modern networks use CIDR rather than classful boundaries.
Last accuracy review:
Audit: CompleteFormula (LaTeX) + variables + units
This section shows the formulas used by the calculator engine, plus variable definitions and units.
Formula (extracted text)
Let prefix be \( p \) (0–32). Subnet mask has \( p \) ones followed by \( 32-p \) zeros. Number of addresses: \( N = 2^{32-p} \) Usable hosts (for \( 0<p<31 \)): \( U = \max(0,\,N - 2) \) Network address: \( \text{net} = \text{IP} \,\&\, \text{mask} \) Broadcast: \( \text{bcast} = \text{net} \,|\, \lnot \text{mask} \) First host: \( \text{net} + 1 \) (if \( U>0 \)) Last host: \( \text{bcast} - 1 \) (if \( U>0 \))
A precise IPv4 subnet tool for engineers, students, and IT pros. Enter an IP and prefix (or mask) to get the
network, broadcast, host range, class, wildcard mask, and private/public status — with formulas and a worked example.
IPv4 Calculator
Enter four octets (0–255) separated by dots, e.g., 10.0.0.1.
/n where n is the number of 1-bits in the subnet mask (0–32). Example: /24 = 255.255.255.0.
Dotted-decimal mask. If provided, this will overwrite the prefix length after validation.
Results
Network
—
Broadcast
—
First Host
—
Last Host
—
Total Hosts
—
Usable Hosts
—
Subnet Mask
—
Wildcard Mask
—
Class
—
Private / Public
—
Binary & Hex view
IP (bin / hex)
—
Mask (bin / hex)
—
Authoritative Data Source & Methodology
Primary sources:
IETF RFC 791 (Internet Protocol) – Sept 1981
IETF RFC 950 (Internet Standard Subnetting Procedure) – Aug 1985
IETF RFC 4632 (Classless Inter-domain Routing, CIDR) – Aug 2006
All calculations strictly derive from the definitions and procedures in these RFCs. “Tutti i calcoli si basano rigorosamente sulle formule e sui dati forniti da questa fonte.”
The Formula Explained
Let prefix be \( p \) (0–32). Subnet mask has \( p \) ones followed by \( 32-p \) zeros.
IP: IPv4 address (32-bit integer rendered as dotted decimal).
Prefix /p: Count of 1-bits in mask.
Subnet mask: 32-bit bitmask; ones for network, zeros for host.
Wildcard mask: Bitwise NOT of subnet mask.
Network: Bitwise AND of IP and mask.
Broadcast: Network OR wildcard.
Total hosts: All addresses in the subnet.
Usable hosts: Excludes network and broadcast when applicable.
How It Works: A Step-by-Step Example
Suppose IP = 192.168.1.10, prefix = /24.
\( p=24 \Rightarrow N = 2^{8} = 256 \) addresses; \( U = 256-2 = 254 \) usable.
Mask = 255.255.255.0. Wildcard = 0.0.0.255.
Network = 192.168.1.0; Broadcast = 192.168.1.255.
First host = 192.168.1.1; Last host = 192.168.1.254.
FAQ
What’s the difference between prefix and subnet mask?
The prefix (e.g., /24) is the count of 1-bits in the mask. The mask is the dotted-decimal representation of those bits (e.g., 255.255.255.0).
Why are network and broadcast not usable?
They identify the subnet itself (all host bits 0) and the broadcast address (all host bits 1). In point-to-point /31 and loopback /32 scenarios, special rules apply.
Is my address private?
Private ranges per RFC 1918: 10/8, 172.16/12, 192.168/16. The calculator flags these.
Do /31 subnets have usable hosts?
On point-to-point links, /31 uses both addresses and omits broadcast (RFC 3021). This tool reports usable hosts accordingly (0 traditional, but both addresses usable on P2P).
Does this support IPv6?
This page focuses on IPv4. Use a dedicated IPv6 calculator for 128-bit addressing and different rules.
What is the wildcard mask used for?
It’s the inverse of the subnet mask, commonly used in ACLs and some router configurations to match address ranges.
How is “class” determined?
Legacy classful ranges based on the first octet: A (0–127), B (128–191), C (192–223). Modern networks use CIDR rather than classful boundaries.
Last accuracy review:
Audit: CompleteFormula (LaTeX) + variables + units
This section shows the formulas used by the calculator engine, plus variable definitions and units.
Formula (extracted text)
Let prefix be \( p \) (0–32). Subnet mask has \( p \) ones followed by \( 32-p \) zeros. Number of addresses: \( N = 2^{32-p} \) Usable hosts (for \( 0<p<31 \)): \( U = \max(0,\,N - 2) \) Network address: \( \text{net} = \text{IP} \,\&\, \text{mask} \) Broadcast: \( \text{bcast} = \text{net} \,|\, \lnot \text{mask} \) First host: \( \text{net} + 1 \) (if \( U>0 \)) Last host: \( \text{bcast} - 1 \) (if \( U>0 \))
A precise IPv4 subnet tool for engineers, students, and IT pros. Enter an IP and prefix (or mask) to get the
network, broadcast, host range, class, wildcard mask, and private/public status — with formulas and a worked example.
IPv4 Calculator
Enter four octets (0–255) separated by dots, e.g., 10.0.0.1.
/n where n is the number of 1-bits in the subnet mask (0–32). Example: /24 = 255.255.255.0.
Dotted-decimal mask. If provided, this will overwrite the prefix length after validation.
Results
Network
—
Broadcast
—
First Host
—
Last Host
—
Total Hosts
—
Usable Hosts
—
Subnet Mask
—
Wildcard Mask
—
Class
—
Private / Public
—
Binary & Hex view
IP (bin / hex)
—
Mask (bin / hex)
—
Authoritative Data Source & Methodology
Primary sources:
IETF RFC 791 (Internet Protocol) – Sept 1981
IETF RFC 950 (Internet Standard Subnetting Procedure) – Aug 1985
IETF RFC 4632 (Classless Inter-domain Routing, CIDR) – Aug 2006
All calculations strictly derive from the definitions and procedures in these RFCs. “Tutti i calcoli si basano rigorosamente sulle formule e sui dati forniti da questa fonte.”
The Formula Explained
Let prefix be \( p \) (0–32). Subnet mask has \( p \) ones followed by \( 32-p \) zeros.
IP: IPv4 address (32-bit integer rendered as dotted decimal).
Prefix /p: Count of 1-bits in mask.
Subnet mask: 32-bit bitmask; ones for network, zeros for host.
Wildcard mask: Bitwise NOT of subnet mask.
Network: Bitwise AND of IP and mask.
Broadcast: Network OR wildcard.
Total hosts: All addresses in the subnet.
Usable hosts: Excludes network and broadcast when applicable.
How It Works: A Step-by-Step Example
Suppose IP = 192.168.1.10, prefix = /24.
\( p=24 \Rightarrow N = 2^{8} = 256 \) addresses; \( U = 256-2 = 254 \) usable.
Mask = 255.255.255.0. Wildcard = 0.0.0.255.
Network = 192.168.1.0; Broadcast = 192.168.1.255.
First host = 192.168.1.1; Last host = 192.168.1.254.
FAQ
What’s the difference between prefix and subnet mask?
The prefix (e.g., /24) is the count of 1-bits in the mask. The mask is the dotted-decimal representation of those bits (e.g., 255.255.255.0).
Why are network and broadcast not usable?
They identify the subnet itself (all host bits 0) and the broadcast address (all host bits 1). In point-to-point /31 and loopback /32 scenarios, special rules apply.
Is my address private?
Private ranges per RFC 1918: 10/8, 172.16/12, 192.168/16. The calculator flags these.
Do /31 subnets have usable hosts?
On point-to-point links, /31 uses both addresses and omits broadcast (RFC 3021). This tool reports usable hosts accordingly (0 traditional, but both addresses usable on P2P).
Does this support IPv6?
This page focuses on IPv4. Use a dedicated IPv6 calculator for 128-bit addressing and different rules.
What is the wildcard mask used for?
It’s the inverse of the subnet mask, commonly used in ACLs and some router configurations to match address ranges.
How is “class” determined?
Legacy classful ranges based on the first octet: A (0–127), B (128–191), C (192–223). Modern networks use CIDR rather than classful boundaries.
Last accuracy review:
Audit: CompleteFormula (LaTeX) + variables + units
This section shows the formulas used by the calculator engine, plus variable definitions and units.
Formula (extracted text)
Let prefix be \( p \) (0–32). Subnet mask has \( p \) ones followed by \( 32-p \) zeros. Number of addresses: \( N = 2^{32-p} \) Usable hosts (for \( 0<p<31 \)): \( U = \max(0,\,N - 2) \) Network address: \( \text{net} = \text{IP} \,\&\, \text{mask} \) Broadcast: \( \text{bcast} = \text{net} \,|\, \lnot \text{mask} \) First host: \( \text{net} + 1 \) (if \( U>0 \)) Last host: \( \text{bcast} - 1 \) (if \( U>0 \))