How to create calculator in PowerApps

This Power Apps tutorial will discuss creating a calculator in PowerApps. PowerApps create a calculator example that will show a simple calculator.

Create a calculator in PowerApps

Now, we will see how to create a simple calculator in Power Apps.

First, we will create a canvas app from the PowerApps.com site.

If you are new to PowerApps Canvas App, check out the below URLs:

Here create an app, and you may choose Phone layout or Tablet layout.

create calculator in powerapps
Create an app in Power Apps

Then, add the below controls to your screen: TextBox and Label from Power Apps input controls.

You can change the name of your control to recognize the control easily. Below is my screen, which looks like this after adding TextBox and Label.

Here I have set the background Image as black Image and changed the button color to orange and the Textbox to blue.

Build a calcular in power apps
create calculator in powerapps

Next, click on the first textbox and go to the Onchange property and set the variable as N1. This means whatever value you enter in the textbox, it will store in the N1 variable.

You can visit the Microsoft site to learn more about creating a variable in PowerApps.

powerapps create calculator
powerapps create calculator

The same step you have to follow here, go to the Onchange property of your textbox and Set the value in the N2 variable. This means whatever the value you enter in the textbox, it will store in variable N2.

how to create a simple calculator in Power Apps
create calculator in powerapps

Next, click on the Plus button and go to the OnSelect property and store the N1 and N2 values in a result variable. So do the same for the other button as well.

+ button -> UpdateContext({result: N1 + N2 });
- button -> UpdateContext({result: N1 - N2 });
* button -> UpdateContext({result: N1 * N2 });
/ button -> UpdateContext({result: N1 / N2 });
powerapps create calculator
Build a calculator in power apps

Next go to the Output Textbox and set the result in Textbox property Text.

create calculator in powerapps
create calculator in PowerApps

After set everything, Run the apps and see the output as below.

How to create calculator in PowerApps
Power Apps calculator

This is a simple Power Apps calculator.

See also  How to Send Teams Messages using Power Automate?

You may like the following Power Apps tutorials:

In this tutorial, we will discuss how to create a simple calculator in Power Apps.

>