Plan Google Cloud VPC subnet ranges and calculate usable IP addresses per subnet.
GCP VPCs are global resources with regional subnets, and can operate in auto mode (a /20 subnet, 4,096 addresses, is automatically created in every region as it becomes available) or custom mode (subnets are manually created with an administrator-chosen size per region). GCP reserves 4 IP addresses per subnet — one fewer than AWS/Azure's 5, since GCP does not carve out a separate reserved address for DNS mapping. Firewall rules in GCP apply at the VPC network level (not per-subnet) but are commonly estimated per-subnet during planning to size out baseline security policies like allow-internal, allow-ssh, and default-deny rules.
Usable IPs per GCP subnet
usable = 2^(32 − subnet_prefix) − 4
Auto mode automatically creates a /20 subnet in every GCP region as it's added, using a predefined IP range — simple but inflexible. Custom mode requires you to manually create each subnet with your chosen CIDR range, giving full control over sizing and avoiding auto mode's fixed /20-per-region allocation.
GCP's subnet reservation covers the network address, default gateway, a second-to-last reserved address, and broadcast — it doesn't carve out the extra DNS-mapping address that AWS and Azure each reserve, so GCP subnets yield one more usable address than an equivalently-sized AWS/Azure subnet.
No — GCP firewall rules apply at the VPC network level using tags, service accounts, or IP ranges to target specific instances, rather than being directly attached per-subnet. This calculator's per-subnet estimate is a planning simplification to size a baseline rule set.
Yes, GCP allows converting an auto-mode VPC to custom mode, but this is a one-way operation — once converted, you cannot switch back to auto mode for that network, so this decision should be made deliberately during initial design.