# How to | Do Basic Calculations

The Wolfram Language serves as a convenient and extensible environment for doing basic math. In addition to performing advanced calculations, the Wolfram Language can also be used as a powerful calculator with arbitrary precision.

 In[1]:=
 Out[1]=

Subtract a number from another number:

 In[2]:=
 Out[2]=

Multiply two numbers by using * or a space:

 In[3]:=
 Out[3]=

Spaces between numbers, variables, or function values are interpreted as multiplication. The Wolfram System automatically shows a space between numbers with a multiplication symbol:

 In[4]:=
 Out[4]=

Multiply two complex numbers:

 In[5]:=
 Out[5]=

Divide two numbers:

 In[6]:=
 Out[6]=

The Wolfram Language follows the ordinary order of operations in algebraic calculations:

 In[7]:=
 Out[7]=

Compute the fifth power of 3:

 In[8]:=
 Out[8]=

Compute the square root of 25:

 In[9]:=
 Out[9]=

The Wolfram Language displays the results of calculations using integers, rational numbers, or variables in exact form:

 In[1]:=
 Out[1]=

Use N to get numerical results:

 In[2]:=
 Out[2]=

Adding a decimal to any number forces a numerical result:

 In[3]:=
 Out[3]=

This shows 40 significant digits:

 In[4]:=
 Out[4]=

Approximate using N:

 In[1]:=
 Out[1]=

Get 50 decimal places:

 In[2]:=
 Out[2]=

Calculate 50 significant digits of :

 In[3]:=
 Out[3]=

A large collection of common and well-known functions is built into the Wolfram Language.

Evaluate trigonometric functions:

 In[1]:=
 Out[1]=
 In[2]:=
 Out[2]=

Evaluate the natural logarithm of numbers:

 In[3]:=
 Out[3]=

Find the 125 prime number:

 In[4]:=
 Out[4]=

Find the sum of the first billion positive integers:

 In[5]:=
 Out[5]=

Set a value to a variable by using =:

 In[1]:=
 Out[1]=

Display the value of sy:

 In[2]:=
 Out[2]=

Use sy in a calculation:

 In[3]:=
 Out[3]=

Define a function f:

 In[4]:=

Evaluate the function:

 In[5]:=
 Out[5]=