MySQL POWER() Function
THE WORLD'S LARGEST WEB DEVELOPER SITE

MySQL POWER() Function

❮ MySQL Functions

Example

Return 4 raised to the second power:

SELECT POWER(4, 2);
Try it Yourself »

Definition and Usage

The POWER() function returns m raised to the nth power.

Note: The POWER() function is a synonym for the POW() function.

Syntax

POWER(m, n)

Parameter Values

Parameter Description
m  Required. A numeric value that is the base used in the calculation
n Required. A numeric value that is the exponent used in the calculation

Technical Details

Works in: MySQL 5.7, MySQL 5.6, MySQL 5.5, MySQL 5.1, MySQL 5.0, MySQL 4.1, MySQL 4.0, MySQL 3.23

More Examples

Example

Return 8 raised to the third power:

SELECT POWER(8, 3);
Try it Yourself »

❮ MySQL Functions