Clarks Size Calculator

Memory Size Calculator

Enter how many rows and columns of values you have, their data type and how many copies will be held at once. The calculator gives the memory used in binary and decimal units.

  • Memory
  • Bytes
  • Smaller types
Your data

From 1 to 1000000000000000

From 1 to 1000000

From 1 to 100

1 MiB is 1,048,576 bytes, the unit most programs report.

Memory = values × bytes per value. A table of 1 million rows by 10 columns of float64 holds 10 million values at 8 bytes each, 80 million bytes or 76.3 MiB. As float32 it would take half that.

Memory size chart

1 million values. Search for a type.

Memory by type
TypeBytes each1 million values100 million values
int810.95 MiB0.09 GiB
int1621.91 MiB0.19 GiB
int3243.81 MiB0.37 GiB
float3243.81 MiB0.37 GiB
int6487.63 MiB0.75 GiB
float6487.63 MiB0.75 GiB
UUID1615.26 MiB1.49 GiB
Python int in a list3634.33 MiB3.35 GiB

MiB.

Values and memory

float64. Slide the millions of values.

Each bar is one data type.

How to work out memory

Values to MiB. Step through it.

Count

Rows × columns.

Profile the real program to see overheads.

float64, float32 or int8

Data types. Compare them.

Default.

Bytes8
PrecisionAbout 15 digits
UseScience, money

Choosing the smallest safe type is the easiest way to save memory.

Before you load

Memory checks. Tick each item.

Tick each item as you go.

Load data in chunks if it will not fit.

What you get

Memory sizing. Each tile explains one result.

Memory

MiB or GiB.

Bytes

Exact.

Decimal

MB or GB.

float32

Compared.

int8

Compared.

Strings take far more memory than numbers in most languages.

Frequently Asked Questions

How much memory does an array use?

The number of values times the bytes for each value.

How big is a double precision float?

Eight bytes.

How much RAM do a million doubles need?

About seven point six MiB.

What is the difference between MB and MiB?

A MB is a million bytes, a MiB is one million and forty eight thousand five hundred and seventy six.

Why does Python use more memory?

Each number in a list is a separate object with its own overhead.

How can I cut memory use?

Use smaller data types and avoid extra copies.

Does a DataFrame add overhead?

Yes, a little for the index and column names.

Fit your data in memory

Know how much RAM your arrays need before you run out halfway through a job.

More size calculators

Each one has its own calculator, worked examples and answers to common questions.

See all size calculators