🌐 IP Calculator

Supports IPv4/IPv6: subnet, conversion, analysis

Enter an address

What is an IP Address and Subnet?

An IP address (Internet Protocol Address) is a unique numerical identifier assigned to every device on a network, similar to a mailing address in the physical world. Without IP addresses, data packets would never find their correct destination. The two most widely used versions today are IPv4 (32-bit addresses, approximately 4.3 billion) and IPv6 (128-bit addresses, approximately 3.4×10³⁸).

With the explosive growth of internet-connected devices, IPv4 addresses were exhausted in 2011, and IPv6 adoption is steadily increasing. However, the vast majority of real-world networks still operate on IPv4. Understanding IPv4 subnetting and the mapping relationship between IPv4 and IPv6 is an essential skill for every network engineer and developer.

What is Subnetting?

Subnetting is the technique of dividing a larger IP network into multiple smaller subnetworks. Using CIDR (Classless Inter-Domain Routing) notation, such as 192.168.1.0/24, the /24 indicates that the first 24 bits represent the network portion, leaving 8 bits for hosts.

Why subnetting matters:

  • Efficient Address Utilization: Avoid wasting an entire address block on a segment with only a few dozen devices
  • Enhanced Security: Isolate different departments or functions into separate subnets with routing policies
  • Improved Performance: Reduce the broadcast domain size, minimizing unnecessary broadcast traffic
  • Simplified Management: Organize subnets by geography or organizational structure for clearer network topology

CIDR Quick Reference Table

CIDRSubnet MaskUsable HostsTotal Addresses
/8255.0.0.016,777,21416,777,216
/16255.255.0.065,53465,536
/24255.255.255.0254256
/25255.255.255.128126128
/26255.255.255.1926264
/27255.255.255.2243032
/28255.255.255.2401416
/29255.255.255.24868
/30255.255.255.25224
/32255.255.255.25511

Multiple Representations of an IPv4 Address

An IPv4 address is fundamentally a 32-bit unsigned integer, but it can be expressed in several formats:

  • Dotted Decimal: The most common format, e.g. 192.168.1.1, each octet being 8 bits (0–255)
  • Decimal Integer: The entire 32-bit value as a single integer, e.g. 192.168.1.1 = 3232235777
  • Hexadecimal: Commonly used in low-level programming and protocol analysis, e.g. 0xC0A80101
  • Binary: The raw 32-bit binary representation, useful for understanding subnet mask bitwise operations
  • Octal: Appears in some legacy systems and URL obfuscation scenarios, with each octet expressed as a 3-digit octal number

Understanding conversions between these representations is valuable for network debugging, security analysis, and low-level development.

IPv4-to-IPv6 Mapping Mechanisms

Since IPv4 and IPv6 will coexist for a long time, the IETF has defined several IPv4-to-IPv6 mapping schemes that allow nodes in IPv6 networks to communicate with IPv4 nodes:

  • IPv4-mapped IPv6 Address (::ffff/96): Format ::ffff:x.x.x.x, e.g. ::ffff:192.168.1.1. This is the most commonly used mapping, representing IPv4 connections within IPv6 software. In network programming, if a server binds to :: (the IPv6 wildcard address), incoming IPv4 client connections appear in this format
  • IPv4-compatible IPv6 Address (Deprecated): Format ::x.x.x.x. This was an early transition mechanism, now deprecated by RFC 4291 and no longer recommended
  • 6to4 Tunnel Address (2002::/16): Embeds the IPv4 address after the 2002: prefix, forming an IPv6 address like 2002:xxxx:xxxx::/48. This allows any site with a public IPv4 address to automatically obtain a /48 IPv6 prefix, enabling automatic tunnel communication between IPv6 islands

Complete Guide to IPv6 Address Types

IPv6 has a much richer address type system than IPv4, with different types serving different purposes:

  • Global Unicast: 2000::/3, equivalent to IPv4 public addresses — globally unique and routable
  • Link-Local: fe80::/10, automatically configured on every IPv6-enabled interface, only valid on the directly connected link, used for neighbor discovery and autoconfiguration
  • Unique Local: fc00::/7, equivalent to IPv4 private addresses (like 192.168.x.x), used within organizations and not routable on the public internet
  • Multicast: ff00::/8, used for one-to-many communication, replacing IPv4 broadcasts. IPv6 has no broadcast concept — all one-to-many communication uses multicast
  • Loopback: ::1, equivalent to IPv4's 127.0.0.1, used for localhost testing
  • Unspecified: ::, equivalent to IPv4's 0.0.0.0, meaning "no address"

Why Use an Online IP Calculator?

In daily work, network engineers and developers frequently need to quickly calculate subnet ranges, verify CIDR configurations, or convert IP addresses between different formats. Manual calculation is not only time-consuming but also error-prone — especially when dealing with 128-bit IPv6 addresses, where manual computation is nearly impossible. Our online IP Calculator provides the following capabilities:

  • Auto-Detection: Enter an IPv4 address, IPv4 CIDR, IPv6 address, or IPv6 CIDR — the tool automatically detects the type and displays the appropriate results
  • Subnet Calculation: Get the network address, broadcast address, subnet mask, wildcard mask, usable host range, and more with a single input
  • Format Conversion: Freely switch an IPv4 address between dotted decimal, decimal integer, hexadecimal, binary, and octal formats
  • IPv4→IPv6 Mapping: Instantly see four different IPv6 mapping forms for any IPv4 address
  • IPv6 Analysis: Automatically expand compressed format, identify address type and scope, with IPv6 subnet calculation support
  • 100% Local: All computations run in your browser — no data is ever uploaded to any server

No installation required — just open your browser. An essential tool for every network engineer and full-stack developer.