Calculate GSC average position with weights
On this page
Do not average row-level average positions. Sum the position totals and impressions, then calculate using the field belonging to the table you queried.
Daniel Waisberg and Gaal Yahas’s BigQuery practice article covers aggregation and query costs. This tutorial isolates a reporting check: verify the position calculation against a hand-worked example. The numbers below are invented teaching data, not client results.
Identify the aggregation first
The current export schema uses sum_top_position in the property-aggregated searchdata_site_impression table and sum_position in the URL-aggregated searchdata_url_impression table. Both position sums are zero-based; add one to the final ratio.
Do not combine URL-table impressions and call them property impressions. Record property, table, dates, country, device and search type before comparing outputs.
Work through two rows
Assume these rows belong to the same property table and comparable scope, without overlapping impression records:
| Row | Impressions | Zero-based position sum | Row average position |
|---|---|---|---|
| A | 10 | 90 | 10 |
| B | 90 | 90 | 2 |
| Combined | 100 | 180 | 2.8 |
The unweighted calculation, (10 + 2) / 2 = 6, gives the rows equal influence. The correct calculation is 180 / 100 + 1 = 2.8. Row B has nine times the impressions. This does not mean a keyword always ranks at position 2.8 or that every searcher sees the same result.
Check a bounded query
Replace the project and dataset placeholders in this GoogleSQL. Real BigQuery execution can incur charges: inspect estimated bytes or run a dry run and set an appropriate maximum bytes billed. LIMIT does not replace a partition-date restriction.
SELECT
data_date,
SUM(impressions) AS impressions,
SAFE_DIVIDE(SUM(sum_top_position), SUM(impressions)) + 1
AS average_position
FROM `your_project.searchconsole.searchdata_site_impression`
WHERE data_date BETWEEN DATE '2026-10-19' AND DATE '2026-10-25'
AND search_type = 'web'
AND country = 'deu'
GROUP BY data_date
ORDER BY data_date;This groups German Web search by day; country codes have three letters. Preserve null when impressions are zero rather than displaying position one. Export dates use Pacific Time, which needs alignment before joining local-time analytics dates.
Investigate scope before changing the formula
Check property versus URL aggregation, filters, dates and processing status. Removing anonymized queries or retaining only a short query list changes coverage; a correct formula cannot recover excluded records.
Keep the hand calculation, SQL and output. If a dashboard still shows six, inspect whether it averages the query results again. Repair the layer introducing the error rather than adjusting the final number manually.
State the reporting limit
Read position beside comparable impressions, clicks and page groups. Newly appearing low-position queries can move a site average without every established page losing position.
Acceptance means the formula matches the sample under documented filters. Investigate missing export days before interpreting a trend with gaps.