Contact

AVERAGEIF Function in Google Sheets: Formula, Examples & Troubleshooting

Statistical Intermediate Google Sheets

Learn the AVERAGEIF formula in Google Sheets: average numbers matching a single condition, with reproducible examples, expected answers and compatibility cautions.

Verification status: See the evidence and test scope described in this guide. How formula examples are checked

Quick answer: Use AVERAGEIF to average numbers matching a single condition. The example below supplies exact inputs and independently calculated expected results, so you can check your formula before replacing the demonstration values with real workbook data.

Verification: The function is covered by a vendor reference or its published formula catalogue. The worked outputs here are independently reasoned, not screenshots or native test results from Google Sheets. Check current Sheets service scope and argument details in the referenced vendor help.

Availability and version history

  • Introduced: Introduction version not established by the official history reviewed.
  • Availability: Documented in the rolling Google Sheets service; examples use the web spreadsheet workflow.
  • Checked: October 14, 2026; official AVERAGEIF reference. Documentation check, not a new native test; existing example-verification notes retain their scope.

Syntax and arguments

=AVERAGEIF(range, criteria, [average_range])

Filter range with criteria; average values in aligned average_range. In formula syntax, square brackets mark optional arguments; do not type square brackets into an ordinary formula unless the particular function requires array notation. The separator shown is for the example locale and might change with spreadsheet settings.

When to use it: To apply two or more restrictions, use AVERAGEIFS.

Prepare the example inputs

Create a blank Google Sheets spreadsheet, enter the data as values (not quoted numeric strings), and use a clear output cell. Confirm File → Settings → Locale before comparing punctuation-sensitive formulas.

For the formulas that reference cells, enter this small dataset into A1:F9 (the first row contains headings). The Amount and Units columns are numbers; the team, status, item and agent columns are text. Keep the calculation cell outside A1:F9 so it cannot overwrite an input.

Row A · Item B · Team C · Status D · Amount E · Units F · Agent
1 Item Team Status Amount Units Agent
2 Pen East Paid 120 12 Ana
3 Pad West Pending 75 5 Bo
4 Box East Paid 210 7 Ana
5 Tape North Paid 90 0 Cy
6 Folder West Paid 150 3 Bo
7 Pen East Pending 60 8 Dee
8 Pad West Paid 125 12 Ana
9 Box North Pending 80 4 Cy

Worked example: exact formula and expected output

=AVERAGEIF(B2:B9,"East",D2:D9)

Expected result: 130. East values 120,210,60 total 390 across three orders.

  1. Select an unused output cell (for example H2 if the practice table occupies A1:F9).
  2. Enter the formula exactly as shown, including the opening equals sign and quoted text.
  3. Compare the displayed answer to the expected result, then inspect the source cells if it differs.

For a range formula, the row numbers include data rows only unless the example explicitly refers to headers. A result that looks plausible may still be wrong if it references the wrong column.

Second example: a different input

=AVERAGEIF(C2:C9,"Paid",D2:D9)

Expected result: 139. Five paid amounts total 695; 695/5 =139.

This independent check can be entered in the next blank output cell; it helps distinguish a genuine calculation issue from a reference or paste-location mistake.

Omitted average range and connected-data scope

The normal Sheets signature is AVERAGEIF(criteria_range, criterion, [average_range]). Google explicitly states that omitting average_range uses criteria_range itself. The separately labeled BigQuery version uses data columns; these worksheet examples do not depend on that mode.

=AVERAGEIF(D2:D9,">=125")

Expected result: approximately 161.666666667, from 210+150+125=485 across three numeric observations. With a separate average range, the criterion can instead test a label while the result summarizes its aligned amounts.

Use matching boundaries for the reproducible controls. Google’s dedicated help does not establish Excel’s effective-rectangle extension for a short supplied average_range, so that behavior is not asserted for Sheets.

Advanced example: compare the criterion count with the measured mean

For West records, the amounts are 75, 150 and 125:

=AVERAGEIF(B2:B9,"West",D2:D9)
=SUMIF(B2:B9,"West",D2:D9)/COUNTIF(B2:B9,"West")

Both independently expected results are approximately 116.666666667 for this entirely numeric amount column. The second expression exposes numerator 350 and denominator three.

It is not a universal replacement in a mixed-type column. Counting matching labels alone does not demonstrate how many usable numeric observations enter an average. The sparse function page does not establish every text, blank, logical or error combination, so those cases remain outside the successful controls.

Advanced example: make a threshold editable

Put numeric 125 in H2:

=AVERAGEIF(D2:D9,">="&H2)

Expected result is approximately 161.666666667. Raising H2 to 150 leaves values 210 and 150, with mean 180. A stricter cutoff can raise the mean while reducing the participant count.

This is selection, not a change to the observations themselves. Keep the count alongside the average if readers need to see that two reports summarize populations of different sizes.

Advanced example: combine group means with actual weights

East, West and North have numeric means 130, approximately 116.666666667, and 85, with counts three, three and two. Their simple average is approximately 110.555555556.

The mean across all eight numeric amounts is 113.75, from 910/8. The correct reconstruction for the stated data is:

=(AVERAGEIF(B2:B9,"East",D2:D9)*3+AVERAGEIF(B2:B9,"West",D2:D9)*3+AVERAGEIF(B2:B9,"North",D2:D9)*2)/8

If source values are later removed or excluded, recalculate the participant weights. A group name’s row count does not automatically remain the right weight for an arbitrary measurement policy.

Advanced example: distinguish an absent group from a zero mean

There is no South Team in the original register. For these all-numeric amounts, a report can state the selection’s absence explicitly:

=IF(COUNTIF(B2:B9,"South")=0,"No matching rows",AVERAGEIF(B2:B9,"South",D2:D9))

The independently expected report label is No matching rows. This is a selected report value, not a claim about the raw AVERAGEIF no-match error code or a general evaluation-order guarantee.

A genuine numeric zero average is different. In a separate control with Keep labels in K2:K3 and values -5 and 5 in L2:L3, =AVERAGEIF(K2:K3,"Keep",L2:L3) has expected result 0, based on two real observations whose signed amounts balance.

Advanced check: retain the unit of the averaged column

=AVERAGEIF(C2:C9,"Paid",E2:E9) has expected result 6.8 Units, from 34 Units across five Paid records. The zero-Units record participates in this numeric dataset. The original Paid Amount average is 139 in a different unit.

The direct source lists the available comparisons, including not-equal criteria. It does not certify every malformed-input or no-numeric-observation error, so a migration guide should not substitute another product’s error table for native Sheets evidence.

Important edge cases and a common mistake

Watch out: Do not silently replace missing or nonnumeric measurements with zeros; the full mixed-type matrix is outside the checked numeric examples.

Google Sheets may expand range outputs automatically and apply locale-aware parsing. A workbook imported from Excel can behave differently after conversion; recalculate the sample inside the target file.

Troubleshooting in Google Sheets

In Sheets, a #N/A often indicates that a lookup found no match or a filter returned no matching row. #REF! may indicate that an array result could not expand; #ERROR! can indicate incorrect formula syntax. Open the cell error tooltip and confirm the spreadsheet locale.

If you get the wrong answer but no error, try these checks in order: (1) evaluate the simplified first example; (2) confirm the cell values and data types; (3) check the exact row and column boundaries; (4) verify quoted text, comparison operators and separators; (5) only then add more criteria or nested functions.

For a reproducible comparison with another spreadsheet product, use the same input values in both applications and record the Sheets service check date, file-import mode and spreadsheet locale. Different default matching behavior or handling of empty values can be a migration issue rather than a mathematical disagreement.

Moving this formula between spreadsheet programs

Google Sheets may use ARRAYFORMULA and different regex or sorting conventions than Excel. Do not paste a LibreOffice formula with semicolon argument separators into a US-locale Sheets file without reviewing the syntax.

Related guides already published for this function: Microsoft Excel | LibreOffice Calc | Apache OpenOffice Calc | Gnumeric | PlanMaker 2026

If a comparison tool says Not researched here, that means we do not yet have a checked guide for that software. It does not mean the software lacks this function. See the 12-program comparison tool for a guide-coverage matrix.

Official reference and editorial verification

Evidence level: Vendor-published function catalogue / formula overview, checked for this editorial batch on October 11, 2026; example outputs verified by direct reasoning/arithmetic where applicable. No execution in Google Sheets was performed. Some platform-, language- and release-specific edge cases remain for native testing.

October 14, 2026 review scope

The full guide and original examples were reviewed against the dedicated Google AVERAGEIF reference. Added results are independently modeled arithmetic and explicitly scoped matching controls. Native Sheets execution, exhaustive coercion and connected-data behavior were not tested.