Choose the right calculation

Network Calculators: IPv4, IPv6, Prefixes and Integer Bases

A network prefix separates shared address bits from the remaining host bits. IPv4 uses 32 bits and IPv6 uses 128, so their range arithmetic has different scales and conventions. The network tools show address calculations; they do not allocate public addresses, discover a network or configure a router. This collection also connects integer-base conversion and password generation where those underlying representations matter.

Calculators in this collection

Compare inputs and scope

Compare inputs and scope
CalculatorInputs to checkMain scope limit
Subnet CalculatorIPv4 or IPv6 address, Prefix length (IPv4 0–32; IPv6 0–128)IPv4 uses /0–/32, with /31 point-to-point and /32 single-address host-count conventions. IPv6 uses /0–/128 and has no broadcast-address subtraction.
CIDR CalculatorIPv4/prefix or IPv6/prefixIPv4 uses /0–/32, with /31 point-to-point and /32 single-address host-count conventions. IPv6 uses /0–/128 and has no broadcast-address subtraction.
Binary Hex Decimal ConverterUnsigned digits, Input baseNo fractions, signs, or two’s-complement interpretation are inferred.
Password GeneratorLength, Uppercase letters, Lowercase lettersLength must be at least the number of selected character types, and at most 128.

A prefix length describes shared bits

An IPv4 /24 prefix fixes the first 24 of 32 bits, leaving 8 bits and 2^8 = 256 total addresses. An IPv6 /64 leaves 64 bits and 2^64 total addresses, which is too large for exact representation as an ordinary JavaScript number. Exact integer arithmetic is required for address totals and range endpoints; a rounded floating-point count is not a valid substitute.

The prefix identifies a mathematical block, not necessarily the number of devices you can deploy. Address assignment policies, reserved addresses, routing and protocol behavior add separate constraints. A host address supplied with a prefix can be normalized to its network boundary by clearing the non-prefix bits. Keep the original address distinct from that resulting network address.

Total addresses and usable hosts are different counts

For an ordinary IPv4 multi-access subnet, excluding network and broadcast addresses gives the familiar 2^hostBits − 2 host estimate. That shortcut is not applied indiscriminately: /31 point-to-point links and /32 host routes have different purposes. A /30 block contains four addresses, but an ordinary multi-access interpretation has two host positions.

The tool displays the adopted interpretation rather than hiding the small-prefix exception. A computed range does not show whether an address is private, allocated, reachable or already in use. Do not interpret a successful parsing result as proof that the address is appropriate for a real deployment.

IPv6 does not use an IPv4 broadcast subtraction

IPv6 address ranges are expressed by prefix bits and support hexadecimal notation with zero compression. The shorthand :: can represent one contiguous run of zero groups, and each full hexadecimal group holds 16 bits. Expand and normalize the value before doing arithmetic, then format it consistently for display.

An IPv6 /128 represents one address and /0 represents the entire 128-bit address space. There is no IPv4-style broadcast address to subtract from every block. Practical use of a prefix depends on the relevant interface, router and address-assignment design. The calculator gives the exact block boundaries, not a recommendation to assign every address in a block.

Use bases and random generation for their stated tasks

The integer-base converter helps inspect a bit mask without losing precision in a decimal representation. It should reject digits outside the selected base and preserve a valid zero. Hexadecimal letters are a representation convention, not different mathematical values merely because they are uppercase or lowercase.

The password generator uses a cryptographic random source rather than a predictable pseudorandom sequence intended for simulation. Length and character variety influence the search space under a stated independent-choice model, but a generated string alone does not prove account security. Reuse, credential storage, authentication controls and device security remain separate issues. Password inputs and outputs stay in the browser and are not part of analytics.

Questions before you calculate

Does an address count equal usable hosts?

Not always. An address block is a mathematical range, while usable-host conventions depend on the protocol and link purpose. IPv4 /31 and /32 require explicit interpretation, and IPv6 does not use a universal network-and-broadcast subtraction.

Does a valid IPv6 address prove it is reachable?

No. Parsing and prefix calculation establish the syntax and mathematical range only. Routing, assignment and the actual network environment determine reachability. The tool does not send probes or configure a remote system.

Why use exact integers for network ranges?

A 128-bit address and large block totals exceed ordinary floating-point integer precision. Exact integer operations preserve every bit. Convert the result to a string for display instead of forcing it through an approximate decimal number.

Sources