Contact

AVERAGEIF Function in Apple Numbers: Syntax, Examples and Troubleshooting

Statistical Intermediate Apple Numbers

A practical Apple Numbers AVERAGEIF guide with exact syntax, verified documentation, worked results and common pitfalls.

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

Quick answer: =AVERAGEIF(A2:A6,"East",B2:B6) returns 20 for the five-region Hours table below. It selects the three East observations, 10,20,30, then divides their total of 60 by three.

Availability and version history

  • Introduced: Documented in Apple’s Formulas and Functions Help 15.4; the original introduction release is not established.
  • Availability: Currently documented in Apple’s Functions Help 15.4 documentation edition; it is not a final supported-version endpoint.
  • Scope: Shared iWork function help. Availability in individual clients and older releases is not established by this check.
  • Checked: October 14, 2026, against the official AVERAGEIF reference. Documentation and independent typed/arithmetic checks; no native Numbers test.

Syntax and optional average range

=AVERAGEIF(test-values, condition, avg-values)

Apple prints all three argument names but explicitly makes avg-values optional. Omit it to use test-values for both the test and the average. With a separate average collection, its size must match the tested collection so corresponding positions refer to the intended records.

The tested collection can contain any values. The optional average collection is documented for numbers or booleans. When omitted, or identical to test-values, that collection must contain only numbers or booleans. These examples use numeric hours and do not infer an undocumented Boolean conversion result.

A condition can use a comparison, a reference, concatenation, wildcards or a REGEX function. Quoted text such as “East” tests the category; it is not the average range.

Complete the original Hours worksheet

Create a Numbers table named Example, with ten columns A:J and eight rows, including one header row. Enter Region and Hours in A1:B1, then the original data:

Row A: Region B: Hours
2 East 10
3 West 14
4 East 20
5 West 22
6 East 30

Enter these formulas outside A:B:

Cell Formula Expected result
D2 =AVERAGEIF(A2:A6,"East",B2:B6) 20
D3 =AVERAGEIF(A2:A6,"West",B2:B6) 18
D4 =AVERAGEIF(B2:B6,">20") 26
D5 =AVERAGEIF(B2:B6,">=20") 24
D6 =AVERAGE(B2:B6) 19.2

D4 is the original omitted-range example: only 22 and 30 qualify. D5 includes 20 as well, so its denominator becomes three. The difference between > and >= changes the selected observations, not merely the display.

An editable selector with a transparent denominator

Put East in F2. In G2 enter =COUNTIF(A2:A6,F2), H2 =SUMIF(A2:A6,F2,B2:B6) and I2 =AVERAGEIF(A2:A6,F2,B2:B6). Expect 3,60,20. In J2 enter =H2/G2; expect 20.

Change F2 to West; G2:J2 become 2,36,18,18. Restore East afterward. This reconstruction is valid because every candidate hour in this fixture is numeric and the selected set is nonempty.

For an absent category, enter =COUNTIF(A2:A6,"Central") separately in F5; expect 0. A mathematical mean then has no denominator. The cited AVERAGEIF page does not specify every native no-match display, so do not replace that state with an unexplained zero or assume an error label.

Wildcards can change which labels belong together

Create LabelMeans, with six columns and six rows, including a header row. Put labels E,East,Eastside,E?,West* in A2:A6 and numeric values 4,8,12,16,20 in B2:B6.

Cell Formula Expected result
D2 =AVERAGEIF(A2:A6,"E*",B2:B6) 10
D3 =AVERAGEIF(A2:A6,"E?",B2:B6) 10
D4 =AVERAGEIF(A2:A6,"E~*",B2:B6) 4

The asterisk matches multiple characters; the question mark matches one character; the tilde makes the following asterisk literal. D2 selects the first four labels, while D3 selects the two two-character labels E* and E?. The equal means of 10 arise from different selected sets. D4 selects only the actual label E*.

Advanced: compare group means without losing group size

On Example, put East and West in F7:F8. In G7 enter =COUNTIF($A$2:$A$6,F7) and H7 =AVERAGEIF($A$2:$A$6,F7,$B$2:$B$6); fill G7:H7 through row 8. Expect counts 3,2 and means 20,18.

In J7 enter =AVERAGE(H7:H8); expect 19. In J8 enter =(G7*H7+G8*H8)/(G7+G8); expect 19.2, matching D6. An average of regional averages weights regions equally; the count-weighted version reconstructs the five observations.

For a separate zero-hours case, copy Example to ZeroHours, then replace B4’s 20 with numeric 0. D2 becomes approximately 13.3333333333, from (10+0+30)/3. The zero remains a measured observation. Do not treat it as a missing record merely because it lowers the mean.

Matching dimensions do not repair shifted records. A2:A6 must correspond to B2:B6, not a similarly sized but displaced hours range. Keep each label and measurement together when sorting.

AVERAGEIFS adds multiple conditions and places the average range first. COUNTIF and SUMIF expose the selected count and total for complete numeric data. COUNTIFS and SUMIFS serve the corresponding multiple-condition calculations.

The reference does not exhaustively settle every error, empty, imported-text or case-conversion boundary. Use the document’s argument separators and Numbers table references rather than assuming another program’s sheet notation is interchangeable.