In this post, we will help you to perform Arithmetic operations in Command Prompt on Windows 11/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 11/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 without decimal points) using Command Prompt, this post is helpful.
Perform Arithmetic operations in Command Prompt
At first, you need to launch Command Prompt using the Windows Search box or Run command box. After that, you can execute the commands.
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.
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.
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
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.