IPv4 CIDR Subnet, Password Entropy & URL/Base64 Encoding Calculator

Compute IPv4 CIDR subnet masks & usable host counts, password Shannon entropy bits, and URL encoding.

IPv4 /24 Usable Hosts & Password Entropy
254 Hosts • 95.3 bits entropy
Subnet Mask: 255.255.255.0 (256 total IPs) • URL Encoded: CalculatorGraph%3D100%25
Subnet Mask (/24) 255.255.255.0
Usable Host IP Count 254
Password Shannon Entropy 95.3 bits
RFC 3986 URL Encoded CalculatorGraph%3D100%25
Inputs
/bits
Network prefix bits (e.g. /24 = 255.255.255.0 with 254 usable hosts).
chars
Total characters in randomly generated password.
Size of character set used by CSPRNG.
Text to encode per RFC 3986.
Results & Graph
IPv4 /24 Usable Hosts & Password Entropy
254 Hosts • 95.3 bits entropy
Subnet Mask: 255.255.255.0 (256 total IPs) • URL Encoded: CalculatorGraph%3D100%25
Subnet Mask (/24)
255.255.255.0
Usable Host IP Count
254
2^8 − 2
Password Shannon Entropy
95.3 bits
Strong (≥80 bits)
RFC 3986 URL Encoded
CalculatorGraph%3D100%25

IPv4 32-Bit Address Allocation & Password Entropy Bits

Network Prefix Bits vs. Host Bits vs. Password Entropy Bits
Graph 1 • 32-Bit IPv4 Network Prefix vs. Host Bit Partition Shows exact bit boundary for your /N CIDR prefix
Network Prefix (24 bits) Host ID (8 bits) /24 CIDR Mask • Total IPs = 2^8 (256) • Usable Hosts = 254
Graph 2 • Password Shannon Entropy & Brute-Force Resistance (Bits) H = Length × log₂(Character Pool)
Weak (<45b) 0 Moderate (45–65b) 45 Strong (65–90b) 65 Cryptographic (≥90b) 90 140 95.27 bits
Graph 3 • Usable IPv4 Host Counts Across /24 to /28 Subnets Usable hosts = 2^(32 − Prefix) − 2 (excludes network & broadcast)
/24 Subnet (255.255.255.0: Standard LAN) 254 hosts /25 Subnet (255.255.255.128: Half C-Block) 126 hosts /26 Subnet (255.255.255.192: Quarter Block) 62 hosts /27 Subnet (255.255.255.224) 30 hosts /28 Subnet (255.255.255.240) 14 hosts
Summary: /24 mask is 255.255.255.0 (254 usable hosts) and password entropy is 95.3 bits.
Summary: An IPv4 /24 network has 8 host bits (subnet mask 255.255.255.0), providing 256 total addresses and 254 usable host IPs. A random 16-character password drawn from an alphabet of 62 symbols has 95.3 bits of Shannon entropy.
Interactive chart & math engine powered by CalculatorGraph

Formula & Mathematical Methodology: CIDR Host Bit Allocation & Shannon Information Entropy

Usable Hosts = 232 − Prefix − 2,   Entropy (H) = L × log2(N)
UsableHosts = 2^(32 − Prefix) − 2; Entropy (bits) = L × log₂(N)
  • 32 − Prefix: Number of host bits remaining in a 32-bit IPv4 address
  • L, N: Password length L and character pool size N

Rounding: Exact bitwise integer arithmetic; entropy rounded to 1 decimal place.

Worked Example: IPv4 /24 Subnet & 16-Character Alphanumeric (Base-62) Password

Find subnet mask and usable hosts for /24, and entropy of a 16-char alphanumeric password.

  1. Host bits = 32 − 24 = 8 bits → 2⁸ = 256 total IPs (254 usable hosts after subtracting network and broadcast addresses); Mask = 255.255.255.0.
  2. Entropy = 16 × log₂(62) = 16 × 5.954 = 95.3 bits of entropy.
Result: /24 provides 254 usable hosts (255.255.255.0) and 95.3 bits of password entropy.

Frequently Asked Questions

Why does a /24 subnet have 254 usable hosts instead of 256?

In IPv4 subnetting, the first address (all host bits 0) is reserved as the Network Identifier and the last address (all host bits 1) is reserved as the Broadcast Address.

Developer Tools · Networking, Security & Web Encoding

IPv4 CIDR Subnet, Password Entropy & URL/Base64 Encoding Calculator: inputs, method, and how to read the result

Compute IPv4 CIDR subnet masks & usable host counts, password Shannon entropy bits, and URL encoding.

Choose inputs for the case you are checking

The defaults are illustrative. Replace them with values for your case and keep the units shown beside each field.

  • IPv4 CIDR Prefix Length (/1 to /32): Network prefix bits (e.g. /24 = 255.255.255.0 with 254 usable hosts).
  • Password Length (Characters): Total characters in randomly generated password.
  • Character Pool Alphabet Size (N): Size of character set used by CSPRNG.

What the calculation includes

With the default values shown, IPv4 /24 Usable Hosts & Password Entropy is 254 Hosts • 95.3 bits entropy. The calculation follows CIDR Host Bit Allocation & Shannon Information Entropy; the formula and variable definitions above show how the inputs combine.

One-input check: With the other defaults held constant, changing IPv4 CIDR Prefix Length (/1 to /32) from 24 /bits to 26 /bits changes IPv4 /24 Usable Hosts & Password Entropy (254 Hosts • 95.3 bits entropy) to IPv4 /26 Usable Hosts & Password Entropy (62 Hosts • 95.3 bits entropy). This is a comparison inside the calculator's stated model, not a prediction.

Where to use caution

  • Subtracts 2 addresses (network ID and broadcast) for prefixes /1 through /30.
  • Shannon entropy formula assumes characters are drawn independently via a cryptographically secure random generator (CSPRNG), not human dictionary words.

Scope: Global (IETF RFC 4632 / NIST SP 800-63B) Check the assumptions and limitations against your situation before relying on the estimate.

More in Developer Tools: Aspect Ratio, Image Dimensions & Storage Converter, API Token Cost Calculator, Matrix Determinant/Inverse & Binary/Hex Radix Calculator.