In mathematics, an exponent is a symbol or number placed above and after another symbol or number. For example, with 22, x3, and xn the 2, 3, and n are all exponents. In the case of 22, if you were to put this into a calculator (2^2), it would equal 4.
- See our scientific notation page on converting numbers to numbers with exponents.
How to type an exponent
If you are writing a document, HTML web page, or other text and need to create an exponent, you can create an exponent using superscript. See our superscript page for further information about this setting.
Exponents in programming languages
Because the caret "^" is used as a special character in programming languages to perform tasks, the appropriate symbol for "raised to the nth power" is two asterisks. For example, if you need to solve a problem such as "210" in a programming language, you would type "2**10" as is shown in the following example written in Perl.
my $variable = 2**10;
Running the above Perl script would return "1024" to the screen.