Statistical
1.0K monthly searches
Beginner
4 min read

AVERAGEIF Function in Excel - Average with Condition

Calculate averages based on conditions with this conditional averaging function....

Quick Start

Syntax

=AVERAGEIF(range, criteria, [average_range])

Parameters

range - Required. Range to evaluate against criteria (e.g., B2:B100 for regions or categories).

criteria - Required. Condition to test - number, text, expression like ">70", "East", or cell reference.

average_range - Optional. Optional. Actual cells to average if different from range (e.g., sales values).

Simplest Example

ABC
1ProductRegionSales
2LaptopEast5000
3MouseWest150
4KeyboardEast300
5MonitorEast800
6East Avg:
=AVERAGEIF(B2:B5, "East", C2:C5)
2033

Quick Reference

Average by Text Criteria
=AVERAGEIF(B2:B100, "East", C2:C100)

Average sales for East region only

Calculates mean of C values where B="East"

Average Above Threshold
=AVERAGEIF(A2:A100, ">=90")

Average of all scores 90 or above

Returns mean of values ≥90 in range A2:A100

Average with Cell Reference
=AVERAGEIF(Category, A2, Price)

Average price for category in A2

Dynamic criteria from cell reference

Exclude Zeros
=AVERAGEIF(A2:A100, "<>0")

Average excluding zero values

Mean of non-zero numbers only

Real-World Examples

Regional Sales Performance Analysis

Use this conditional averaging function to calculate average sales by region for performance comparison. Sales managers use AVERAGEIF to benchmark territory performance - identify high-performing regions, spot underperforming areas, and allocate resources effectively. The AVERAGEIF formula makes regional analysis instant and accurate. This pattern applies to any scenario where you need category-based averages: department performance, product line profitability, customer segment analysis, or territory metrics across any business dimension.

ABCD
1SalespersonRegionSalesRegion Avg
2JohnWest$45K
3SarahEast$52K
4MikeWest$38K
5LisaEast$61K
6West Avg:
=AVERAGEIF(B2:B5, "West", C2:C5)
$41.5K
Pro Tip: Use dynamic criteria (cell reference) for interactive dashboards: =AVERAGEIF(Region, E1, Sales)
Pattern: =AVERAGEIF(category_range, "category", values_range)
Student Performance - High Achievers Average

Calculate average scores for high performers using this conditional averaging function with comparison operators. Teachers use AVERAGEIF to segment student performance - track honors students separately, identify gifted learners, measure advanced program effectiveness. The AVERAGEIF formula with greater-than criteria isolates top performers instantly. Essential for grade distribution analysis, scholarship qualification, advanced placement recommendations, and academic performance reporting across schools and districts.

ABC
1StudentScoreHigh Avg (≥90)
2Alice95
3Bob82
4Carol91
5David88
6Result:
=AVERAGEIF(B2:B5, ">=90")
93
Pro Tip: Combine with COUNTIF to see sample size: =COUNTIF(Scores, ">=90") shows how many students meet criteria
Pattern: =AVERAGEIF(range, ">=threshold") for above-average analysis

Common Mistakes to Avoid

=AVERAGEIF(B2:B100, "East")Forgetting the average_range parameter

❌ The Problem:

  • Averages the criteria range (B2:B100) instead of values range
  • Returns wrong results when criteria and values are in different columns
  • Common mistake when transitioning from single-column to multi-column data
  • Hard to spot because formula doesn't error - just gives incorrect numbers

✅ Solution:

=AVERAGEIF(B2:B100, "East", C2:C100)

Always specify the average_range (third parameter) when your criteria column differs from your values column. The AVERAGEIF formula needs to know which range to evaluate (B2:B100 for region) and which range to average (C2:C100 for sales). This three-parameter pattern is essential for most real-world scenarios where filtering criteria and numeric values live in separate columns.

=AVERAGEIF(A1:A10, ">="&100)Using comparison operators incorrectly

❌ The Problem:

  • Missing quotes around comparison operators
  • Syntax errors with dynamic criteria
  • Criteria not properly concatenated with cell references
  • Works with hardcoded numbers but fails with variables

✅ Solution:

=AVERAGEIF(A1:A10, ">="&B1)

Enclose operators in quotes and use & to concatenate with cell references: ">="&B1 combines the operator with cell B1's value. The AVERAGEIF formula requires proper string concatenation for dynamic comparison criteria. This pattern enables flexible thresholds that users can change without editing formulas - essential for interactive reports and dashboards.

=AVERAGEIF(Region, "East" OR "West", Sales)Trying to use OR logic in criteria

❌ The Problem:

  • AVERAGEIF only handles single criterion - no OR/AND support
  • Formula returns error or unexpected results
  • Cannot directly average multiple categories
  • Need different approach for multi-criteria averaging

✅ Solution:

=(AVERAGEIF(Region, "East", Sales) + AVERAGEIF(Region, "West", Sales))/2

For multiple criteria with OR logic, use multiple AVERAGEIF formulas and combine results. Or better, upgrade to <Link href="/formulas/averageifs">AVERAGEIFS</Link> for AND logic, or use array formulas for complex OR conditions. The AVERAGEIF function is designed for single-criterion filtering - multi-criteria scenarios require different techniques or functions.

Frequently Asked Questions

Other Statistical Functions

Related Formulas

Master these AVERAGEIF variants:

Master Excel AVERAGEIF

From basics to advanced - AI generates perfect formulas instantly.