IP Calculator – Free IPv4 & IPv6 Subnet Tool
🔍 IP Calculator (IPv4 & IPv6)
IP Calculator – Learn IP Subnet Calculation for IPv4 and IPv6
Understanding IP subnet calculation is essential for network engineers, cybersecurity experts, students, and tech professionals. Whether working with IPv4 or IPv6, knowing how subnetting works helps design efficient, secure, and scalable networks.
This guide covers the fundamentals of subnetting, CIDR notation, IP classes, wildcard masks, host calculations, and how to use the free IP Calculator on this page.
What Is Subnetting?
Subnetting divides a larger IP network into smaller sub-networks (subnets). This makes IP allocation more efficient and networks more manageable.
Benefits of subnetting:
-
Efficient IP usage
-
Network segmentation
-
Improved routing
-
Enhanced security
IPv4 Addressing and Subnetting
What is an IPv4 Address?
An IPv4 address is a 32-bit number, commonly shown as four decimal numbers separated by dots (e.g., 192.168.0.1
), where each part ranges from 0–255.
IPv4 Address Classes
IPv4 was originally divided into address classes:
Class | IP Range | Default Subnet | Hosts | Usage |
---|---|---|---|---|
A | 0.0.0.0 – 127.255.255.255 | /8 | ~16 million | Large networks |
B | 128.0.0.0 – 191.255.255.255 | /16 | ~65,000 | Medium networks |
C | 192.0.0.0 – 223.255.255.255 | /24 | 254 | Small networks |
D | 224.0.0.0 – 239.255.255.255 | Reserved | – | Multicasting |
E | 240.0.0.0 – 255.255.255.255 | Reserved | – | Experimental use |
Today, Classful networking is replaced by CIDR (Classless Inter-Domain Routing).
Private vs Public IPv4 Addresses
Private IP ranges are reserved for internal network use and are not routable on the public internet:
Class | Private Range | Usage |
---|---|---|
A | 10.0.0.0 – 10.255.255.255 | Large private networks |
B | 172.16.0.0 – 172.31.255.255 | Medium private networks |
C | 192.168.0.0 – 192.168.255.255 | Home/small office networks |
Public IPs are globally routable and assigned by ISPs or cloud providers.
Subnet Mask and CIDR Notation
-
CIDR (Classless Inter-Domain Routing) uses
/
followed by the number of bits for the network.-
e.g.,
/24
means first 24 bits are for the network.
-
-
Subnet Mask converts that into IP form:
-
/24
=255.255.255.0
-
Example Table:
CIDR | Subnet Mask | IP Count | Usable Hosts |
---|---|---|---|
/8 | 255.0.0.0 | 16.7M | 16.7M – 2 |
/16 | 255.255.0.0 | 65,536 | 65,534 |
/24 | 255.255.255.0 | 256 | 254 |
/30 | 255.255.255.252 | 4 | 2 |
What is a Wildcard Mask?
A wildcard mask is the inverse of a subnet mask. It’s commonly used in access control lists (ACLs) and firewall rules.
-
Subnet Mask:
255.255.255.0
-
Wildcard Mask:
0.0.0.255
Wildcard masks allow a router to match a range of IP addresses in a rule.
IPv4 Subnet Outputs
With any subnet, you can calculate:
-
Network Address – the starting IP in the block
-
Broadcast Address – the final IP used to send to all devices
-
IP Range – all usable addresses in between
-
Total IPs –
2^(32 - subnet bits)
-
Usable Hosts – usually
total - 2
(except/31
,/32
)
IPv6 Subnetting – Next Generation Networking
What is an IPv6 Address?
An IPv6 address is a 128-bit hexadecimal address divided into eight 16-bit blocks:
Example: 2001:0db8:85a3:0000:0000:8a2e:0370:7334
IPv6 replaces IPv4 due to address exhaustion and includes built-in support for:
-
Multicasting
-
Auto-configuration
-
Better routing
Common IPv6 Subnet Sizes
CIDR | Description | Approx. IP Count |
---|---|---|
/64 | Standard device network | ~18 quintillion |
/56 | ISP-to-customer | ~7.2×10¹⁶ subnets |
/48 | Large organization | ~1.2×10²⁴ addresses |
-
IPv6 doesn’t use subnet masks in dot-decimal format.
-
It doesn’t have broadcast addresses like IPv4.
-
It uses link-local and multicast methods instead.
How to Use the IP Calculator
Use the IP Calculator above to calculate both IPv4 and IPv6 subnet details instantly.
Step-by-Step User Guide
1. Select IP Version
Choose either IPv4
or IPv6
using the dropdown.
2. Enter IP Address
Type your IP address (e.g., 192.168.1.1
or 2001:db8::1
).
3. Choose CIDR Subnet
-
IPv4:
/8
to/32
-
IPv6:
/16
to/128
4. Click “Calculate”
You’ll see results based on the selected version.
Example Output (IPv4)
CIDR: /24
→ Network Address: 192.168.1.0/24
→ Subnet Mask: 255.255.255.0
→ Wildcard Mask: 0.0.0.255
→ Broadcast Address: 192.168.1.255
→ IP Range: 192.168.1.1 - 192.168.1.254
→ Usable Hosts: 254
→ Total IPs: 256
Example Output (IPv6)
CIDR: /64
→ IPv6 Address: 2001:db8::1/64
→ Prefix Length: /64
→ Total IP Count: 18,446,744,073,709,551,616
→ Note: No broadcast address in IPv6
Why Subnetting Matters
Subnetting is critical in:
-
Network Security: Separate networks for internal/external use.
-
Performance: Smaller broadcast domains = faster LANs.
-
Scalability: Allocate subnets by region, department, or purpose.
-
Cost-saving: Avoid wasting public IPs.
Real-World Use Cases
-
ISPs assigning customer IP blocks
-
Enterprise LAN/WAN configuration
-
Cloud computing (AWS, Azure VPCs)
-
VPN and tunnel routing
-
Firewall and ACL configuration
Tips for Network Designers
-
Use
/24
for most small IPv4 segments -
Use
/30
or/31
for point-to-point links -
Use
/64
for all IPv6 networks unless otherwise required -
Avoid overlapping subnets to prevent routing errors
Conclusion
IP subnetting is a vital concept for anyone managing or configuring networks. With this IP Calculator, you can instantly compute:
-
Subnet masks
-
Wildcard masks
-
Broadcasts
-
Host counts
-
IPv6 ranges
This tool supports both IPv4 and IPv6, making it perfect for beginners and professionals alike.
Bookmark this calculator, and use it whenever you plan, troubleshoot, or study networking!