EMBEDDED TOOL

Arduino SRAM Usage Estimator

Estimate global-variable SRAM usage against your board's memory budget.

Estimated SRAM used by these variables

Remaining (of board budget)

Breakdown

About this tool

List your sketch's global variables and get a rough estimate of how much of your board's limited SRAM they'll use — handy for catching "out of memory" and mysterious crash/reset issues before they happen, especially on small AVR boards like the Uno with only 2KB of RAM total.

This only estimates global/static variables you declare — it doesn't account for the stack, heap allocations (String, malloc, dynamic arrays), or memory used internally by libraries, all of which also eat into the same SRAM budget at runtime.

Frequently asked questions

Why is my board crashing even though this says I have room left?
Because this only counts global variables — the call stack (function calls, local variables) and heap (String objects, dynamic memory) both grow into the remaining SRAM at runtime and aren't estimated here. Heavy use of the String class in particular is a common source of memory problems on small AVR boards.
What byte sizes does this assume for each type?
Standard AVR (8-bit Arduino) sizes: bool/char/byte = 1 byte, int/unsigned int/short = 2 bytes, long/unsigned long/float = 4 bytes, double = 4 bytes (same as float on AVR, unlike most other platforms where it's 8).
Does this apply to ESP32/ESP8266 boards?
Not really — those chips have far more RAM (hundreds of KB) and different type sizes in some cases (double is a true 8 bytes), so global-variable budgeting is rarely the constraint there. This tool is most useful for RAM-constrained AVR boards.