Skip to content
Marvin's Toolbox.

Search tools

Type to filter all tools

IP Subnet Calculator

Work out an IPv4 or IPv6 network from an address with a prefix or netmask: network and broadcast addresses, usable host range, subnet mask, wildcard mask and address type. Adjust the prefix with a slider, read the binary breakdown, and split the network into smaller subnets.

Everything runs locally in your browser. Your data never leaves your device.

IPv4 or IPv6, with an optional prefix like /24 or a netmask like 255.255.255.0.

Nothing to calculate yet
Type an IP address above, or try one of the examples, to see its network, masks, host range and more.

Next steps

Send this tool's output straight into another tool.

Convert text into every case at once: title case in the APA, AP, Chicago, MLA, Bluebook, AMA and NYT styles, sentence case, upper, lower, camelCase, snake_case, kebab-case and more.

Count words, characters, sentences, paragraphs, lines and more as you type, with estimated reading and speaking time.

Remove duplicate lines from a list or text, keeping the first occurrence. Optionally ignore case and whitespace, or drop blank lines too.

Replace text in two modes: plain find and replace all, or regular expressions with flag controls and capture group references like $1.

Compare two texts and see every added, removed and changed line highlighted, side by side or inline, with the changed words marked within each line. Ignore case, whitespace or blank lines, read a summary of how much changed, and export the result as a unified diff.

Paste a UUID to see what it carries: version, variant, and for time-based versions the exact timestamp, clock sequence and node. Also shows the raw bytes, the 128-bit integer and the URN form.

Decode Base64 to text or encode text to Base64. Paste into the top box, read the result below, and flip the direction with one click. Handles Unicode correctly, reads URL-safe Base64, and shows binary payloads as a hex dump you can download.

Convert numbers between binary, octal, decimal, hexadecimal and any base up to 36. Type into any field and the others update as you go. Handles huge integers without losing precision and accepts 0x, 0b and 0o prefixes.

Convert between scientific notation and full numbers as you type. Reads 1.23e5, 1.23 × 10^5 and plain numbers, shows the value written out, in normalized scientific notation and in engineering notation, and can round to any number of significant digits.

About the IP Subnet Calculator Tool

This tool takes an IP address with a prefix or netmask and works out the whole network around it. Type 192.168.1.42/24 and you get the network and broadcast addresses, the range of usable hosts, the subnet mask and wildcard mask, what kind of address it is, and the address in binary with the network bits highlighted.

It reads IPv4 and IPv6. For IPv4 you can give the size as a CIDR prefix like /24 or as a dotted netmask like 255.255.255.0, and non-contiguous masks are rejected with a clear message. For IPv6 you get the compressed and fully expanded forms of the address, the first and last address of the network, and address counts written as powers of two, since numbers like 2^64 are easier to reason about than twenty digits.

What you can do

  • Find the network address, broadcast address and usable host range of a subnet.
  • Convert between a CIDR prefix and a dotted subnet mask.
  • Get the wildcard mask for router ACLs.
  • Resize a network by dragging the prefix slider and watch every value update.
  • Split a network into smaller equal subnets and copy the list.
  • Expand or compress an IPv6 address.
  • Check whether an address is private, public, loopback, link-local or another special range.
  • See the reverse DNS pointer name for an address.

How to use the IP Subnet Calculator

  1. 1Type an IP address, alone or with a prefix like /26 or a netmask.
  2. 2Read the summary cards and the detail rows, each value has its own copy button.
  3. 3Drag the prefix slider to grow or shrink the network and compare the results.
  4. 4Pick a new prefix under the split section to divide the network into smaller subnets.

How subnet math works

An IPv4 address is 32 bits and the prefix says how many of them, counted from the left, name the network. The rest name hosts inside it. A /24 leaves 8 host bits, so the network spans 256 addresses. The first one is the network address and the last one is the broadcast address, and neither can be assigned to a machine, which is why a /24 has 254 usable hosts. The binary breakdown in the tool shows exactly this split, with the network bits highlighted.

Two prefixes are special. A /31 holds just two addresses and, per RFC 3021, both are usable, because point-to-point links between routers need no broadcast. A /32 is a single host route.

IPv6 differences

IPv6 has no broadcast address and no netmask notation, the prefix length is the only way to write a network size. Every address in a network is assignable, so the tool reports the first and last address instead of a host range. Networks are also enormous: the standard subnet size is a /64, which holds 2^64 addresses. The same address can be written many ways, so the tool shows both the RFC 5952 canonical short form and the fully expanded form.

Special address ranges

Not all addresses are ordinary public space. The tool recognises the special-use ranges from the IANA registries and names them: the RFC 1918 private ranges (10.0.0.0/8, 172.16.0.0/12, 192.168.0.0/16), loopback, link-local, carrier-grade NAT, multicast, the documentation ranges, and for IPv6 the unique local, link-local, IPv4-mapped and Teredo ranges among others. This is a quick way to check whether an address should ever appear on the public internet.

Enter a resolution to get its simplified aspect ratio, or start from a ratio and one side to get the missing dimension. Knows the common ratios like 16:9, 4:3 and 21:9 and shows how close your size is to each.

Calculate AND, OR, XOR, NOT and bit shifts with a live binary view of every operand and the result. Enter numbers in decimal, hex, octal or binary and see each bit line up as you type.

Convert Unix file permissions between checkboxes, octal like 755 and symbolic notation like rwxr-xr-x, all kept in sync as you edit any of them. Covers setuid, setgid and the sticky bit, and shows the matching chmod command ready to copy.

Convert between px, rem, em, percent, pt and viewport units with a configurable root font size. Type into any field and the others update as you go, set the parent font size for em math, and read a conversion table for common sizes.

Work out how long a download or file transfer takes from the file size and your connection speed. Handles all the common size and speed units, breaks the duration down readably, compares typical connections and can also solve for speed or file size.

Convert numbers between binary, octal, decimal, hexadecimal and any base up to 36. Type into any field and the others update as you go. Handles huge integers without losing precision and accepts 0x, 0b and 0o prefixes.