π IP Subnet Calculator
Calculate IPv4 subnet details from IP address and mask. Network, broadcast, usable hosts, wildcard mask, IP class, and scope β all computed in your browser.
π When to Use
Ideal for network engineers, sysadmins, and students who need quick subnet calculations without launching a terminal or desktop app. Enter any IPv4 address with a CIDR prefix or dotted-decimal mask to instantly see network address, broadcast, usable host range, and more β all computed in your browser with no server communication.
βοΈ How It Works
The calculator performs bitwise AND between the IP address and subnet mask to determine the network address, then ORs with the wildcard mask for the broadcast. Special handling for /31 (RFC 3021 point-to-point) and /32 (single host) edge cases ensures correct results where the general 2(32-p)-2 formula fails. All calculations use unsigned 32-bit integer arithmetic to correctly handle high-octet addresses above 127.
Frequently Asked Questions
What does an IP Subnet Calculator do?
It calculates subnet details from an IP address and mask: network address, broadcast address, usable host range, number of usable hosts, subnet mask in both CIDR and dotted-decimal, wildcard mask, IP class, and private/public scope.
Does this tool support IPv6?
No, this is IPv4-only (v1). IPv6 uses 128-bit addresses with :: notation and requires BigInt arithmetic β planned as a separate tool.
What's the difference between CIDR and dotted-decimal?
CIDR (/24) specifies the number of 1-bits in the mask. Dotted-decimal (255.255.255.0) writes each 8-bit octet. Both are supported and auto-converted.
What are /31 and /32 subnets used for?
/32 is a single host (firewall rules, loopback). /31 is RFC 3021 point-to-point link β both addresses usable, no dedicated network/broadcast. The calculator handles both.
How is private vs. public determined?
RFC 1918: 10.0.0.0/8, 172.16.0.0/12, 192.168.0.0/16. Also flagged: 127.0.0.0/8 (loopback), 169.254.0.0/16 (link-local). All others are public.
What is a non-contiguous mask?
A valid subnet mask has contiguous 1-bits (1s then 0s). 255.255.0.255 has 0s between 1s β not valid and rejected with an error.
Does my data get sent to a server?
No. All calculations use pure JavaScript bitwise arithmetic in your browser. No data leaves your device.