SUBNET CALCULATOR

IPv4 and IPv6 network calculator with CIDR notation and binary visualization

CLIENT
Fully client-side

Everything runs locally in your browser. Your data never leaves your device - no uploads, no servers, no data transmission.

All processing happens directly on your machine using JavaScript. Close the tab and all data is released.

Calculate mode

0.0.0.0
Network address
0.0.0.0
Broadcast
0
Total hosts
0
Usable hosts
1
Subnets
Enter IPv4 address (e.g., 192.168.1.0)
Enter subnet mask or select CIDR notation
0 CALCULATIONS
Network class
-
CIDR Notation
/0
Wildcard mask
-
First usable IP
0.0.0.0
Last usable IP
0.0.0.0
IP Type
-
IP Address:
0.0.0.0 00000000.00000000.00000000.00000000
Subnet mask:
0.0.0.0 00000000.00000000.00000000.00000000
Network address:
0.0.0.0 00000000.00000000.00000000.00000000
Broadcast address:
0.0.0.0 00000000.00000000.00000000.00000000
Wildcard mask:
0.0.0.0 00000000.00000000.00000000.00000000

Available subnets

CIDR Notation quick reference

Common CIDR notations with their subnet masks and usable host counts for IPv4 networks.

CIDR
Subnet mask
Hosts
/8
255.0.0.0
16,777,214
/9
255.128.0.0
8,388,606
/10
255.192.0.0
4,194,302
/11
255.224.0.0
2,097,150
/12
255.240.0.0
1,048,574
/13
255.248.0.0
524,286
/14
255.252.0.0
262,142
/15
255.254.0.0
131,070
CIDR
Subnet mask
Hosts
/16
255.255.0.0
65,534
/17
255.255.128.0
32,766
/18
255.255.192.0
16,382
/19
255.255.224.0
8,190
/20
255.255.240.0
4,094
/21
255.255.248.0
2,046
/22
255.255.252.0
1,022
/23
255.255.254.0
510
CIDR
Subnet mask
Hosts
/24
255.255.255.0
254
/25
255.255.255.128
126
/26
255.255.255.192
62
/27
255.255.255.224
30
/28
255.255.255.240
14
/29
255.255.255.248
6
/30
255.255.255.252
2
/32
255.255.255.255
1

How to use Subnet calculator

IPv4 and IPv6 network calculation in 3 steps

Full Documentation Docs
1

Choose mode

Select IPv4 or IPv6 protocol

2

Enter details

Input IP address and prefix

3

Analyze

View full network analysis

IPv4 & IPv6 support
Binary visualization
Auto subnet generation
Multi-format export

Why choose this subnet calculator?

IPv4 and IPv6, binary visualization, 256 subnets, TXT/CSV/JSON export, class detection

Dual protocol support

Full support for both IPv4 and IPv6 calculations with instant mode switching and protocol-specific features.

Binary visualization

View IP addresses, subnet masks, and network addresses in binary format with proper formatting for both IPv4 and IPv6.

Subnet generation

Automatically generate multiple subnets with configurable count, complete with network ranges and host calculations.

Network class detection

Auto-detects IP class (A/B/C/D/E) with quick-fill buttons for Class A, B, C private ranges (10.x, 172.16-31.x, 192.168.x).

CIDR Reference

Built-in CIDR notation reference table with Class A, B, and C network ranges for quick lookup and learning.

Export options

Export results in TXT, CSV, or JSON formats, or copy to clipboard for easy integration with documentation and reports.

Frequently Asked Questions

Everything about subnet calculation

Does this calculator support both IPv4 and IPv6?

Yes. This calculator fully supports both IPv4 and IPv6 protocols. Select your preferred mode at the top, and the interface adapts to show relevant calculations including binary representation, subnet generation, and address analysis for your chosen protocol.

How do I use the subnet generator?

After calculating your network, switch to the "Subnet List" tab, specify how many subnets you need (up to 256), and click "Generate Subnets". The calculator will automatically create properly sized subnets with no address overlaps, showing network addresses, ranges, and host counts for each subnet.

What is the binary view used for?

The binary view shows IP addresses and subnet masks in binary format, helping you understand how subnetting works at the bit level. For IPv4, octets are separated by periods; for IPv6, hextets are separated by colons. This is especially useful for learning and troubleshooting network configurations.

Can I export calculation results?

Yes! Click the download icon to export results in TXT (human-readable), CSV (spreadsheet-compatible), or JSON (machine-readable) formats. You can also use the copy icon to quickly copy results to your clipboard for pasting into documentation or reports.

What is the difference between IPv4 and IPv6 calculations?

IPv4 uses 32-bit addresses with subnet masks and wildcard masks, while IPv6 uses 128-bit addresses with prefix lengths. IPv6 doesn't have broadcast addresses (using "last address" instead) and includes address scope information (Global, Link-Local, etc.). Both protocols support full subnet generation and binary visualization.

How does the calculation history work?

Every calculation is automatically saved to IndexedDB in your browser. Click the "History" button to view your history, and select any previous calculation to instantly restore it. The calculator automatically detects whether it's an IPv4 or IPv6 calculation and switches modes accordingly.

Technical Details

How this subnet calculator online tool works under the hood

IPv4 Subnet Calculation Engine

This IPv4 subnet calculator processes 32-bit addresses with bitwise AND/OR operations to derive network addresses, broadcast addresses, and host ranges in sub-1ms execution time. CIDR notation (RFC 4632) is parsed directly - enter /24 and the engine computes the subnet mask (255.255.255.0), wildcard mask (0.0.0.255), and usable host count (254) instantly.

Full IPv6 Support

This subnet calculator online tool handles 128-bit IPv6 addresses with prefix lengths from /1 to /128. The engine expands compressed notation (::1), calculates network prefixes, and determines address scope (Global, Link-Local, Unique Local). Subnet generation supports up to 256 subnets per calculation with full address range output.

Binary Visualization

The binary view renders IP addresses and subnet masks as raw bit patterns - 32 bits for IPv4, 128 bits for IPv6. Network bits and host bits are visually separated, making it clear exactly where the subnet boundary falls. This subnet calculator displays each octet (IPv4) or hextet (IPv6) with proper dot/colon separation for readability.

Zero-Upload Architecture

Every calculation runs entirely in your browser using JavaScript bitwise operations. No IP addresses or network configurations are transmitted to any server. Zero data collection, zero analytics on your inputs. Close the tab and everything is gone.