OCI VCN CIDR Calculator
Carve an OCI VCN into subnets and count usable hosts after the three addresses Oracle reserves in every subnet.
Inputs
OCI accepts VCN CIDR blocks from /16 to /30.
Usable Hosts per Subnet
253
Subnets Available in the VCN
256
VCN Address Range
10.0.0.0 – 10.0.255.255
First Subnet CIDR
10.0.0.0/24
Usable Hosts Across Planned Subnets
2,024
Addresses Reserved by Oracle
24
VCN Space Allocated
3.1%
Reservation Overhead
1.2%
Step by step
Values used
VCN network address = 10.0.0.0; VCN prefix length = 16 bits; Subnet prefix length = 24 bits; Subnets you plan to create = 8 subnets
OCI VCN CIDR
usable hosts = 2^(32 − subnet prefix) − 3, and subnets available = 2^(subnet prefix − VCN prefix).
Usable Hosts per Subnet
= 253
Subnets Available in the VCN
= 256
VCN Address Range
= 10.0.0.0 – 10.0.255.255
First Subnet CIDR
= 10.0.0.0/24
Usable Hosts Across Planned Subnets
= 2,024
Addresses Reserved by Oracle
= 24
How it works
The VCN address is masked to its prefix to find the block, then divided by the subnet size to count how many subnets fit. Oracle reserves three addresses in every subnet — the network address, the subnet's default gateway and the broadcast address — so a /24 yields 253 assignable addresses rather than the 254 an on-premises design would assume. Subnet reservations shift the usable count for every subnet in the VCN at once, and a VCN CIDR cannot be shrunk after creation, so sizing on the real assignable figure avoids a re-address later. The smaller the subnet, the more the three reserved addresses hurt: a /29 gives you five hosts, not eight.
Formula
OCI VCN CIDR
usable hosts = 2^(32 − subnet prefix) − 3, and subnets available = 2^(subnet prefix − VCN prefix).
- 3
- Addresses Oracle reserves per subnet: the network address, the subnet gateway and the broadcast address
- subnet prefix
- Prefix length of each subnet you carve out of the VCN
- VCN prefix
- Prefix length of the VCN itself, between /16 and /30
Frequently Asked Questions
How is OCI VCN CIDR calculated?
usable hosts = 2^(32 − subnet prefix) − 3, and subnets available = 2^(subnet prefix − VCN prefix). The VCN address is masked to its prefix to find the block, then divided by the subnet size to count how many subnets fit. Oracle reserves three addresses in every subnet — the network address, the subnet's default gateway and the broadcast address — so a /24 yields 253 assignable addresses rather than the 254 an on-premises design would assume.
Why does OCI VCN CIDR matter?
Subnet reservations shift the usable count for every subnet in the VCN at once, and a VCN CIDR cannot be shrunk after creation, so sizing on the real assignable figure avoids a re-address later. The smaller the subnet, the more the three reserved addresses hurt: a /29 gives you five hosts, not eight.
What values do I need to enter?
This calculator takes 4 inputs: VCN network address, VCN prefix length, Subnet prefix length, Subnets you plan to create. The pre-filled defaults are a realistic starting point — replace them with figures from your own environment for a result you can act on.
Why does a /24 subnet in OCI give 253 hosts instead of 254?
Oracle takes three addresses from every subnet rather than two: the network address, the address used as the subnet's default gateway, and the broadcast address. A /24 has 256 addresses, so 253 remain assignable to instances and load-balancer VIPs.