CSS pow() function

Definition and usage

CSS pow() The function returns the value of a number (x) raised to the power of another number (y) (i.e., X^)y)

Example

Use pow() Scale text in different <div> elements:

div.a {
  font-size: calc(18px * pow(1.5, 2));
}
div.b {
  font-size: calc(18px * pow(1.5, 1));
}
div.c {
  font-size: calc(18px * pow(1.5, 0));
}
div.d {
  font-size: calc(18px * pow(1.5, -1));
}

Try it yourself

CSS syntax

pow(x, y)
Value Description
x Required. A number (base).
y Required. A number (exponent).

Technical details

Version: CSS4

Browser support

The numbers in the table represent the first browser version to fully support this function.

Chrome Edge Firefox Safari Opera
120 120 118 15.4 106

Related pages

Reference:CSS acos() function

Reference:CSS asin() function

Reference:CSS atan() function

Reference:CSS atan2() function

Reference:CSS calc() function

Reference:CSS cos() function

Reference:CSS exp() function

Reference:CSS hypot() function

Reference:CSS log() function

Reference:CSS mod() function

Reference:CSS sin() function

Reference:CSS tan() function