# IPv4 subnet calculator

> Calculate an IPv4 network, mask and address range.

[Open tool](https://www.toolcabana.com/om/subnet-calculator) · [Network and web](https://www.toolcabana.com/om/category/network-and-web)

Tool ID: subnet-calculator. Requested language: om. Description language: en. Complete guide translation: no; untranslated sections use English.

## Overview (en)

The IPv4 subnet calculator takes an address with or without a /prefix and returns the network, first and last address, netmask, broadcast address, total addresses and usable hosts. Without a prefix it uses the CIDR setting, 24 by default. Calculations use exact integer arithmetic, and /31 and /32 networks follow point-to-point and single-host rules.

## Supported tasks (en)

Calculate an IPv4 network, mask and address range.

## Steps (en)

1. Type or paste your source, or load an example.
2. Change the basic settings or open Advanced mode to fine-tune the result.
3. Review and copy or download your result. Pause Live results to run manually. Sources or individual settings above 20,000 characters require an explicit run.

## Settings

- CIDR prefix (used if address has no /prefix) (en; key: prefix; type: number); minimum: 0; maximum: 32

## Limitations (en)

Text operations generally accept up to 2,000,000 characters. Individual parsers, generators and formulas apply additional limits shown by their controls.

## Example input

```text
192.168.1.24/24
```

## Privacy and connections (en)

This operation processes its source in your browser. Copy and download are explicit actions; source input is not saved in an account or history.

## Questions (en)

### How many usable hosts are in a /24 subnet?

A /24 has 256 total addresses and 254 usable hosts, because the network and broadcast addresses are subtracted. The calculator applies that subtraction for every prefix from /0 up to /30.

### How does the subnet calculator handle /31 and /32?

For /31 it reports no broadcast address and counts both addresses as usable, following point-to-point link semantics. A /32 identifies a single host, so total and usable addresses are both 1.

### Can I enter a host address instead of the network address?

Yes. Enter any address in the subnet, such as 192.168.1.24/24, and the calculator masks it to find the network 192.168.1.0/24 and its range. IPv6 input is rejected here; use the IPv6 subnet calculator for those.

### Where is my input processed?

This operation processes its source in your browser. Copy and download are explicit actions; source input is not saved in an account or history.

### What are the input limits?

Text operations generally accept up to 2,000,000 characters. Individual parsers, generators and formulas apply additional limits shown by their controls.

## Related tools

- [IPv6 subnet calculator](https://www.toolcabana.com/om/ipv6-subnet)
- [IP address validator](https://www.toolcabana.com/om/ip-validator)
