CMD

Perform Arithmetic operations in Command Prompt on Windows 10

Perform Arithmetic operations in Command Prompt on Windows 10

In this post, we will help you to perform Arithmetic operations in Command Prompt on Windows 10. Command Prompt window comes with a mini calculator that helps you perform division, addition, multiplication, and subtraction for two or more numbers. There is a very simple command for each operation.

Though Windows 10 also brings its Calculator app that provides a standard, programmer, scientific, and other types of calculator, for those who want to perform basic Math (or elementary arithmetic operations) using Command Prompt, this post is helpful.

Perform Arithmetic operations in Command Prompt

At first, you need to launch Command Prompt using Windows 10 Search box or Run command box. After that, you can execute the commands.

1] Addition

The command to do addition for two or more numbers is:

set /a num1+num2+num3

Replace num1, num2, etc., with actual numbers (like 5, 10, or something else) and press Enter. This will show the result.

Alternatively, you can execute the addition command like:

set /a result= num1+num2+num3

Again, replace num1, num2 values with actual numbers and it will show the addition result.

2] Division

For division operation, the command is:

set /a num1/num2

You can also perform multiplication and division operations together. The command would be:

set /a result=num1*num2/num3

Execute the command and it will provide the output.

3] Subtraction

The subtraction command is also very simple. You can perform it for two or more numbers. Here it is:

set /a num1-num2-num3

Add actual numbers and the result will be in front of you.

In addition to that, you can also perform subtraction with addition, multiplication, and/or division operations in one go. The command would be:

set /a num1+num2-num3*num4/num6

4] Multiplication

To perform multiplication using Command Prompt, the command is:

set /a num1*num2*num3

Alternatively, you can also execute this command like this:

set /a result= num1*num2

Multiplication can also be done with addition, subtraction, and division together. Just add numbers accordingly and get the result.

This is how you can do Arithmetic operations in Command Prompt.

Cursor jumps or moves randomly while typing in Windows 10
If you find that your mouse cursor jumps or moves on its own, automatically, randomly while typing in Windows laptop or computer, then some of these s...
How to reverse Mouse and Touchpads scrolling direction in Windows 10
Mouse and Touchpads not only make computing easy but more efficient and less time-consuming. We cannot imagine a life without these devices, but still...
How to change Mouse pointer and cursor size, color & scheme on Windows 10
The mouse pointer and cursor in Windows 10 are very important aspects of the operating system. This can be said for other operating systems as well, s...