 # Divide

Updated: 08/16/2021 by Computer Hope

Divide may refer to any of the following: 1. In mathematics, divide is represented by the forward slash (/) key on the keyboard. It describes how many times a number goes into another number. For example, 10 divided by 2 (10 / 2) equals 5.

Tip

To divide numbers on a computer or smartphone, a calculator or spreadsheet could be used.

## Where is the divide key?

The forward slash or divide is found on the key next to the right Shift (same key as the question mark). If your keyboard has a numeric keypad, there are two forward slash or divide symbol keys. For further information about the forward slash, see the forward slash page.

## How to divide in a spreadsheet

To divide in a spreadsheet program, like Microsoft Excel, you can use the forward slash and the cells you want to divide in a formula, as shown below.

`=A1/B1`

Placing this formula in cell C1 shows the total of the value in cell A1 divided by the value in B1. If the A1 or B1 cell values change, the total value in C1 would also change automatically.

Note

If either of these cells are empty or 0 (zero), you get a #DIV/0! error, which is a divide by zero error.

Note

There is no "divide" function in Excel. In other words, you cannot type =DIVIDE(A1/B1).

## How to divide in computer programming

With computer programming, the forward slash can divide a number or numbers stored in a variable as shown in the following Perl code.

```use strict;
my \$first = 15;
my \$second = 5;my \$answer = \$first / \$second;print "You get \$answer if you divide \$first by \$second";
```

When the script above is run, it displays "You get 3 if you divide 15 by 5" on the screen.

Tip

Keep the order of operations in mind when working with more than two numbers. For example, if you want to divide numbers and then add the result to another number, surround the numbers divide in parentheses.