Link Search Menu Expand Document (external link)

How to do basic mathematical computations (in Excel)

See all solutions.

Task

How do we write the most common mathematical operations in a given piece of software? For example, how do we write multiplication, or exponentiation, or logarithms, in Python vs. R vs. Excel, and so on?

Solution

Each of the formulas shown on the right of the table below is valid code for use in Excel formulas, in cells in a worksheet.

Mathematical notation Excel notation Example
x+y x+y =A1+B1
xy x-y =A1-B1
xy x*y =A1*B1
xy x/y =A1/B1
xy x^y =A1^B1
|x| ABS(x) =ABS(A1)
lnx LN(x) =LN(A1)
logab LOG(b,a) =LOG(A1,B1)
ex EXP(x) =EXP(A1)
π PI() =PI()
sinx SIN(x) =SIN(A1)
sin1x ASIN(x) =ASIN(A1)
x SQRT(x) =SQRT(A1)

Other trigonometric functions are also available besides just SIN, including COS, TAN, etc.

Content last modified on 24 July 2023.

See a problem? Tell us or edit the source.

Contributed by Nathan Carter (ncarter@bentley.edu)