Skip to content
Calcrivo

Athena Query Cost Calculator

Model Athena cost per TB scanned and see how partition pruning, column projection and Parquet compression cut the bill.

Inputs

GB
%

A date-partitioned table queried for one day out of a year prunes over 99%.

%

Columnar formats only read the columns in the SELECT and WHERE clauses.

x

Parquet with Snappy typically achieves 3x to 6x against raw CSV or JSON.

queries
$/TB scanned
MB

Estimated Monthly Cost

$146.48

Data Scanned per Query

10.000GB

Data Scanned per Query

10 GiB

Data Scanned per Month

29.297TB

Cost per 1,000 Queries

$48.83

Saving Versus a Full Raw Scan

99.50%

Step by step

  1. Values used

    Table size if scanned in full = 2,000 GB; Data eliminated by partition filters = 90 %; Share of columns the query reads = 20 %; Compression ratio of the stored format = 4 x; Queries per month = 3,000 queries; Athena price = 5 $/TB scanned; Minimum billed scan per query = 10 MB

  2. Athena Query Cost

    scanned per query = table GB × (1 − pruning) × column share ÷ compression ratio, floored at the 10 MB minimum; cost = total TB scanned × price per TB.

  3. Estimated Monthly Cost

    = 146.48

  4. Data Scanned per Query

    = 10.000 GB

  5. Data Scanned per Query

    = 10,737,418,240

  6. Data Scanned per Month

    = 29.297 TB

  7. Cost per 1,000 Queries

    = 48.83

  8. Saving Versus a Full Raw Scan

    = 99.50

How it works

Athena charges only for bytes read from S3, and three independent multipliers reduce that: partition pruning skips whole prefixes before any file is opened, columnar formats read only the columns referenced, and compression shrinks what is left. They multiply, so 90% pruning with 20% of columns at 4x compression scans half a percent of the table — but SELECT * on CSV gets none of the three. The price per TB is an editable input with a realistic us-east-1 default, so confirm the current Athena rate with AWS for your region. Converting a raw CSV lake to partitioned Parquet routinely cuts Athena spend by 95% or more with no query changes, and this is the arithmetic that justifies the conversion job.

Formula

Athena Query Cost

scanned per query = table GB × (1 − pruning) × column share ÷ compression ratio, floored at the 10 MB minimum; cost = total TB scanned × price per TB.

pruning
Share of partitions the WHERE clause lets Athena skip entirely
column share
Fraction of columns read, which only helps on columnar formats
compression ratio
Stored bytes versus raw bytes, typically 3x to 6x for Parquet
10 MB minimum
Floor Athena bills for any query, however small

Frequently Asked Questions

How is Athena Query Cost calculated?

scanned per query = table GB × (1 − pruning) × column share ÷ compression ratio, floored at the 10 MB minimum; cost = total TB scanned × price per TB. Athena charges only for bytes read from S3, and three independent multipliers reduce that: partition pruning skips whole prefixes before any file is opened, columnar formats read only the columns referenced, and compression shrinks what is left. They multiply, so 90% pruning with 20% of columns at 4x compression scans half a percent of the table — but SELECT * on CSV gets none of the three. The price per TB is an editable input with a realistic us-east-1 default, so confirm the current Athena rate with AWS for your region.

Why does Athena Query Cost matter?

Converting a raw CSV lake to partitioned Parquet routinely cuts Athena spend by 95% or more with no query changes, and this is the arithmetic that justifies the conversion job.

What values do I need to enter?

This calculator takes 7 inputs: Table size if scanned in full, Data eliminated by partition filters, Share of columns the query reads, Compression ratio of the stored format, Queries per month, Athena price, Minimum billed scan per query. The pre-filled defaults are a realistic starting point — replace them with figures from your own environment for a result you can act on.

Why does SELECT * cost so much more?

It defeats column projection, so Athena reads every column of every surviving file. On a 200-column table where your query needs three columns, that is roughly 60x more bytes scanned — and bytes scanned is the whole bill.

Do failed queries cost anything?

Cancelled queries are billed for the data scanned up to the point of cancellation, and queries that fail with an error are not billed. Every successful query is billed for at least 10 MB even if it touches less.

You might also need