totn Access Functions

MS Access: Avg Function

This MSAccess tutorial explains how to use the Access Avg function with syntax and examples.

Description

The Microsoft Access Avg function returns the average (arithmetic mean) of a set of numeric values in a select query.

Syntax

The syntax for the Avg function in MS Access is:

Avg ( expression )

Parameters or Arguments

expression
A numeric value. It can be a field or a formula that evaluates to a numeric expression.

Returns

The Avg function returns a numeric value.

Applies To

The Avg function can be used in the following versions of Microsoft Access:

  • Access 2019, Access 2016, Access 2013, Access 2010, Access 2007, Access 2003, Access XP, Access 2000

Example in SQL/Queries

You can use the Avg function in a query by clicking on the Totals button in the toolbar (This is the button with the summation symbol). The Avg function is used in conjunction with the Group By clause.

For example:

Microsoft Access

This query would return the average UnitPrice by ProductName.