# PHP Arithmetic Operators

The arithmetic operators are operators we see commonly in everyday use. Apart from arithmetic negation and arithmetic assertion operators, most Arithmetic operators are binary.

PHP provides plenty of mathematical functions for basic calculations and conversions, calculating logarithms, square roots, geometric values, etc.

Numeric operators take integer or floating-point arguments and compute a result on them. Both left and right arguments to an operator have the same numeric type (integer or floating-point). Still, it is possible to mix these, putting an integer on the left side and floating-point on the right side or the other way around. These operators require numeric values, and non-numeric values are converted into numeric values.

Arithmetic operators combine operands consisting of one or more variables and constants. Arithmetic operators supported by PHP are addition(+),subtraction(-),multiplication(*),division(/) and modulus(%).

Operator | Name | Example | Description |
---|---|---|---|

+ | Addition | $m * $n | Return the sum of both operands `$m` and `$n` |

– | Substration | $m – $n | Return the difference of both operands `$m` and `$n` |

* | Multiplication | $m * $n | Return the product of both operands `$m` and `$n` |

/ | Division | $m / $n | Return the quotient of both operands `$m` and `$n` |

% | Modulo | $m % $n | Return the remainder of both operands `$m` divided by `$n` |

** | Exponentiation | $m ** $n | Return the result of both operands raising `$m` to the `$n` 'th power. |

### PHP - Addition Operator(+)

Both operands are added and returned as output.

` ````
```

Output:

### PHP - Subtraction Operator(-)

Subtracts both operands and returns as output.

` ````
```

Output:

### PHP - Multiplication Operator(*)

Multiplies both operands and returns as output.

` ````
```

Output:

### PHP - Division Operator(/)

Divides numerator by denominator and returns as output.

` ````
```

Output:

### PHP - Modulus Operator(%)

Returns the remainder after the division of the operands.

` ````
```

Output: