Pick the smallest instance size that still clears your CPU and memory peaks with headroom, and price the change.
Within a family EC2 sizes double — large, xlarge, 2xlarge — and price tracks vCPU count closely, so a resize is a power-of-two decision. Dividing peak demand by the fraction of the instance you are willing to fill gives the capacity you need; taking log2 of that against current capacity rounds it to the nearest real size, and the binding dimension is whichever of CPU or memory needs more. Every halving of instance size removes about half the hourly rate, so the difference between a correct and a timid right-sizing decision is usually a factor of two in savings.
EC2 Instance Right-Sizing
required capacity = peak × current capacity ÷ (1 − headroom); size steps = ceil(log2(required ÷ current)), because EC2 sizes double within a family.
required capacity = peak × current capacity ÷ (1 − headroom); size steps = ceil(log2(required ÷ current)), because EC2 sizes double within a family. Within a family EC2 sizes double — large, xlarge, 2xlarge — and price tracks vCPU count closely, so a resize is a power-of-two decision. Dividing peak demand by the fraction of the instance you are willing to fill gives the capacity you need; taking log2 of that against current capacity rounds it to the nearest real size, and the binding dimension is whichever of CPU or memory needs more.
Every halving of instance size removes about half the hourly rate, so the difference between a correct and a timid right-sizing decision is usually a factor of two in savings.
This calculator takes 7 inputs: Current vCPUs, Current memory, Current on-demand rate per hour, Peak CPU utilisation, Peak memory utilisation, Headroom to keep above peak, Hours running per month. The pre-filled defaults are a realistic starting point — replace them with figures from your own environment for a result you can act on.
Because the peak you measured is a sample, not a ceiling. Keeping 25–35% headroom absorbs traffic growth, deploy-time overhead and noisy-neighbour variance. Sizing to the raw peak works only where you can also scale out quickly.