Azure Functions Memory Calculator

Azure Functions doesn't take a free-form memory value: the hosting plan fixes the instance size. Flex Consumption offers 512, 2048 and 4096 MB instances, and anything larger needs an Elastic Premium SKU (EP1–EP3). An instance that runs out of memory is recycled and its in-flight executions fail. This calculator sizes from peak usage and picks the smallest instance that fits.

01 Usage data

Enter observed per-instance usage directly, in MiB.

02 Workload profile

Advanced: margins and defaults

Values the result relies on that are our own defaults, or vendor defaults your setup may change. Each “?” says how one moves the result; the guide says where it comes from.

03 Sizing gauge

0 —

04 Azure CLI command

—

05 How this was derived

Enter usage data to see the calculation.

Instance sizes in short

Azure Functions doesn't take a free-form memory value. Flex Consumption, the recommended serverless plan, offers three instance sizes: 512 MB (0.25 cores), 2,048 MB (1 core) and 4,096 MB (2 cores). Azure docs

Running out of memory recycles the instance, so only the peak sets the size; the margin is MemoryLimit's own default and can be changed under Advanced. The calculator never goes below Microsoft's suggested 2,048 MB unless you lower the minimum there, and above 4,096 MB it points to Elastic Premium.

Executions on an instance share its memory, so the measured peak includes the concurrency the app ran at. Raising concurrency, or moving to a size with a higher default, can need more memory per instance. Azure docs

Common input mistakes

  • Using the average working set as the peak: take the highest per-instance working set over a representative period.
  • Changing concurrency after taking the samples: size again once it has changed.
  • Sizing a Premium app on its own when other apps share the plan: add up the peaks of every app in the plan.

Full derivation, warnings and every assumption: how the Azure Functions calculator works. The shared formula and margin tables: the sizing model.

Related calculators: