Skip to main content

Graphics checks & calculations

Texture memory calculator with mipmaps

Calculate uncompressed texture memory from width, height, format and count. Include exact mipmap levels and compare bytes, MiB, GiB, MB and GB.

Updated:

Texture memory calculator

Estimate uncompressed 2D pixel data. No GPU allocation is needed.

Texture settings

A format selection is a data budget, not a check of device or WebGL format support.

Width and height: 1–65,536 pixels. Texture count: 1–1,000,000. These are calculator limits.

Try an example

Calculated pixel data

Total for all textures

16 MiB

16,777,216 bytes

0.015625 GiB · 16.777216 MB · 0.016777 GB

Base level
16,777,216 bytes · 16 MiB
Additional mip levels
0 bytes · 0 MiB
Levels per texture
1
Mipmap overhead
0%

Base-level formula

1,024 × 1,024 × 4 × 4 = 16,777,216 bytes

Total = sum of width × height × bytes/pixel × texture count at every listed level.

View each mip level (1)
Calculated pixel data: Bytes / all textures
LevelDimensionsBytes / textureBytes / all textures
01024 × 10244,194,30416,777,216

Byte counts are exact; converted units are rounded to 6 decimal places. Binary: MiB = 2²⁰ bytes; GiB = 2³⁰ bytes. Decimal: MB = 10⁶ bytes; GB = 10⁹ bytes.

This is a tightly packed pixel data budget. Driver overhead, row padding, duplicate copies, render targets, compression, and other GPU resources are excluded. It does not measure installed or available VRAM.

Method & result interpretation

Texture memory formula

For an uncompressed 2D texture, base-level pixel data equals width × height × bytes per pixel × texture count. RGBA8 uses four 8-bit channels, or 4 bytes per pixel. Four 1024 × 1024 RGBA8 textures therefore contain 16,777,216 bytes: exactly 16 MiB, or approximately 16.78 MB.

Changing both dimensions from 1024 to 2048 makes that base-level total four times larger, 64 MiB. For a single-channel mask, choose R8 if that matches the format your renderer actually uploads. RGBA16F stores 8 bytes per texel and RGBA32F stores 16, so raising precision increases the budget even when the dimensions stay fixed.

Why mipmaps need a level-by-level calculation

A full mip chain halves each dimension, rounding down and retaining a minimum dimension of one, until a 1 × 1 level remains. The calculator sums the pixel data at every level. For large square textures, the total approaches four thirds of the base level, but that shortcut is not exact for all shapes.

For example, an 8 × 1 RGBA8 texture has levels 8 × 1, 4 × 1, 2 × 1 and 1 × 1. Their sum is 60 bytes, compared with 32 bytes for the base level. A blanket four-thirds multiplier would undercount this thin texture. Non-power-of-two dimensions also need the exact sequence of rounded dimensions.

Budget a set with different sizes and formats

Suppose a scene uses two 2048 × 2048 RGBA8 color maps with full mip chains and four 1024 × 1024 R8 masks with base levels only. Enter one group at a time because each calculation shares one size, format and mip setting. Save each JSON and add the two totalBytes values to get 48,933,544 bytes.

If distant color maps can use 1024 × 1024 without unacceptable detail loss, rerun the color group with only the size changed. Its mipmapped budget falls to 11,184,808 bytes, saving exactly 32 MiB across the two color maps. Keep the masks unchanged when comparing the two budgets. One MiB is 1,048,576 bytes and one MB is 1,000,000 bytes. Compare exact bytes when combining exports or checking another tool.

Illustrative scene budget. Enter the two groups separately.
Texture groupSize and countMipmapsTotal bytes
RGBA8 color maps2048 × 2048, 2 texturesFull chain44,739,240
R8 masks1024 × 1024, 4 texturesBase only4,194,304

Pixel data is not actual VRAM usage

Use the decoded dimensions and the upload format when entering a compressed source image. A PNG file size describes storage or transfer. This estimate covers the uncompressed texture after upload and excludes row padding, driver copies, render targets and the other resources running in the same application. A budget neither measures free graphics memory nor verifies allocation success.

The model covers the listed uncompressed 2D formats and optional complete mip chains. Compressed GPU blocks such as BC and ASTC, cube maps and 3D textures need different models. If you are checking a browser limit, compare both edges with the capability report and verify the upload format separately. For the homepage estimate, select RGBA8 with mipmaps off and enter the same texture size and count.

Technical references

Continue your checks

GPU texture rendering test