# How to build a calculator

**URL:** <https://community.thunkable.com/t/how-to-build-a-calculator/1093730>\
**Category:** Questions about Thunkable X\
**Created:** [February 12, 2021, 9:27am UTC](https://community.thunkable.com/t/how-to-build-a-calculator/1093730 "2021-02-12T09:27:48Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![roumak-coder](https://avatars.discourse-cdn.com/v4/letter/r/b38774/32.png) [@roumak-coder](https://community.thunkable.com/u/roumak-coder)\
**Post date:** [February 12, 2021, 9:27am UTC](https://community.thunkable.com/t/how-to-build-a-calculator/1093730/1 "2021-02-12T09:27:48Z")

</div>

Hi, Can anyone provide me the logic or the code for creating a calculator.  
I am unable to find it out by myself

---

<div class="post-metadata">

**Author:** ![codeswept](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/codeswept/32/87755_2.png) [@codeswept](https://community.thunkable.com/u/codeswept)\
**Post date:** [February 12, 2021, 9:33am UTC](https://community.thunkable.com/t/how-to-build-a-calculator/1093730/2 "2021-02-12T09:33:14Z")

</div>

Yes, even I need some help in this regard.

---

<div class="post-metadata">

**Author:** ![virajkhanna4ade](https://avatars.discourse-cdn.com/v4/letter/v/5e9695/32.png) [@virajkhanna4ade](https://community.thunkable.com/u/virajkhanna4ade)\
**Post date:** [February 12, 2021, 9:36am UTC](https://community.thunkable.com/t/how-to-build-a-calculator/1093730/3 "2021-02-12T09:36:08Z")

</div>

Hi @codeswept and @roumak-coder, I can Help. If you need help then I will create a demo app and send the link.

---

<div class="post-metadata">

**Author:** ![codeswept](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/codeswept/32/87755_2.png) [@codeswept](https://community.thunkable.com/u/codeswept)\
**Post date:** [February 12, 2021, 9:42am UTC](https://community.thunkable.com/t/how-to-build-a-calculator/1093730/4 "2021-02-12T09:42:50Z")

</div>

Thanks.

---

<div class="post-metadata">

**Author:** ![virajkhanna4ade](https://avatars.discourse-cdn.com/v4/letter/v/5e9695/32.png) [@virajkhanna4ade](https://community.thunkable.com/u/virajkhanna4ade)\
**Post date:** [February 12, 2021, 9:43am UTC](https://community.thunkable.com/t/how-to-build-a-calculator/1093730/5 "2021-02-12T09:43:26Z")

</div>

Your welcome. Done with the UI and now coding the app

---

<div class="post-metadata">

**Author:** ![codeswept](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/codeswept/32/87755_2.png) [@codeswept](https://community.thunkable.com/u/codeswept)\
**Post date:** [February 12, 2021, 9:52am UTC](https://community.thunkable.com/t/how-to-build-a-calculator/1093730/6 "2021-02-12T09:52:36Z")

</div>

The type of calculator that I’m trying to make isn’t one where the user has to just put in two numbers and then select ‘add’ or something. It should be able to have any number and any operation conducted.  
Like this:  
[![](https://images.squarespace-cdn.com/content/v1/53a1cb39e4b030ded763dd31/1476995868127-D75CAKC37PL81T1VEIM7/ke17ZwdGBToddI8pDm48kGNkKjeEUqqaFYbs5FKkWFAUqsxRUqqbr1mOJYKfIPR7LoDQ9mXPOjoJoqy81S2I8PaoYXhp6HxIwZIk7-Mi3Tsic-L2IOPH3Dwrhl-Ne3Z265fNHIP_bkdYAnHJSoHdlA9D8mxbY4iC6GrHqcRiVfwKMshLAGzx4R3EDFOm1kBS/image-asset.png) ](https://images.squarespace-cdn.com/content/v1/53a1cb39e4b030ded763dd31/1476995868127-D75CAKC37PL81T1VEIM7/ke17ZwdGBToddI8pDm48kGNkKjeEUqqaFYbs5FKkWFAUqsxRUqqbr1mOJYKfIPR7LoDQ9mXPOjoJoqy81S2I8PaoYXhp6HxIwZIk7-Mi3Tsic-L2IOPH3Dwrhl-Ne3Z265fNHIP_bkdYAnHJSoHdlA9D8mxbY4iC6GrHqcRiVfwKMshLAGzx4R3EDFOm1kBS/image-asset.png)

---

<div class="post-metadata">

**Author:** ![roumak-coder](https://avatars.discourse-cdn.com/v4/letter/r/b38774/32.png) [@roumak-coder](https://community.thunkable.com/u/roumak-coder)\
**Post date:** [February 12, 2021, 9:53am UTC](https://community.thunkable.com/t/how-to-build-a-calculator/1093730/7 "2021-02-12T09:53:40Z")

</div>

Yeah I also need the same

---

<div class="post-metadata">

**Author:** ![virajkhanna4ade](https://avatars.discourse-cdn.com/v4/letter/v/5e9695/32.png) [@virajkhanna4ade](https://community.thunkable.com/u/virajkhanna4ade)\
**Post date:** [February 12, 2021, 9:53am UTC](https://community.thunkable.com/t/how-to-build-a-calculator/1093730/8 "2021-02-12T09:53:50Z")

</div>

Oh Ok

---

<div class="post-metadata">

**Author:** ![codeswept](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/codeswept/32/87755_2.png) [@codeswept](https://community.thunkable.com/u/codeswept)\
**Post date:** [February 12, 2021, 9:54am UTC](https://community.thunkable.com/t/how-to-build-a-calculator/1093730/9 "2021-02-12T09:54:19Z")

</div>

What type of calculator were you about to build?

---

<div class="post-metadata">

**Author:** ![virajkhanna4ade](https://avatars.discourse-cdn.com/v4/letter/v/5e9695/32.png) [@virajkhanna4ade](https://community.thunkable.com/u/virajkhanna4ade)\
**Post date:** [February 12, 2021, 9:54am UTC](https://community.thunkable.com/t/how-to-build-a-calculator/1093730/10 "2021-02-12T09:54:50Z")

</div>

Was just planning about the logic. Planned the UI but thinkng about the code.

---

<div class="post-metadata">

**Author:** ![roumak-coder](https://avatars.discourse-cdn.com/v4/letter/r/b38774/32.png) [@roumak-coder](https://community.thunkable.com/u/roumak-coder)\
**Post date:** [February 12, 2021, 9:55am UTC](https://community.thunkable.com/t/how-to-build-a-calculator/1093730/11 "2021-02-12T09:55:05Z")

</div>

> [@codeswept](#):
>
> It should be able to have any number and any operation conducted.  
> Like this:

I tried to build it but I couldn’t succeed

---

<div class="post-metadata">

**Author:** ![virajkhanna4ade](https://avatars.discourse-cdn.com/v4/letter/v/5e9695/32.png) [@virajkhanna4ade](https://community.thunkable.com/u/virajkhanna4ade)\
**Post date:** [February 12, 2021, 9:55am UTC](https://community.thunkable.com/t/how-to-build-a-calculator/1093730/12 "2021-02-12T09:55:47Z")

</div>

> [@codeswept](#):
>
> The type of calculator that I’m trying to make isn’t one where the user has to just put in two numbers and then select ‘add’ or something. It should be able to have any number and any operation conducted.  
> Like this:

Neither could I succeed

---

<div class="post-metadata">

**Author:** ![codeswept](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/codeswept/32/87755_2.png) [@codeswept](https://community.thunkable.com/u/codeswept)\
**Post date:** [February 12, 2021, 9:57am UTC](https://community.thunkable.com/t/how-to-build-a-calculator/1093730/13 "2021-02-12T09:57:30Z")

</div>

So did I. I need a calculator for my app, and I’m trying to build one.

---

<div class="post-metadata">

**Author:** ![eko.devs.apploroceo](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/eko.devs.apploroceo/32/93147_2.png) [@eko.devs.apploroceo](https://community.thunkable.com/u/eko.devs.apploroceo)\
**Post date:** [February 12, 2021, 10:23am UTC](https://community.thunkable.com/t/how-to-build-a-calculator/1093730/14 "2021-02-12T10:23:37Z")

</div>

u meant new or old ui?

---

<div class="post-metadata">

**Author:** ![virajkhanna4ade](https://avatars.discourse-cdn.com/v4/letter/v/5e9695/32.png) [@virajkhanna4ade](https://community.thunkable.com/u/virajkhanna4ade)\
**Post date:** [February 12, 2021, 10:37am UTC](https://community.thunkable.com/t/how-to-build-a-calculator/1093730/15 "2021-02-12T10:37:23Z")

</div>

old or new. I was building on new. either one works

---

<div class="post-metadata">

**Author:** ![roumak-coder](https://avatars.discourse-cdn.com/v4/letter/r/b38774/32.png) [@roumak-coder](https://community.thunkable.com/u/roumak-coder)\
**Post date:** [February 12, 2021, 10:38am UTC](https://community.thunkable.com/t/how-to-build-a-calculator/1093730/16 "2021-02-12T10:38:01Z")

</div>

Its up to you, cuz the code in both the UI are the same

---

<div class="post-metadata">

**Author:** ![eko.devs.apploroceo](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/eko.devs.apploroceo/32/93147_2.png) [@eko.devs.apploroceo](https://community.thunkable.com/u/eko.devs.apploroceo)\
**Post date:** [February 12, 2021, 10:38am UTC](https://community.thunkable.com/t/how-to-build-a-calculator/1093730/17 "2021-02-12T10:38:51Z")

</div>

making one in new ui

---

<div class="post-metadata">

**Author:** ![luv.ak.tech](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/luv.ak.tech/32/104896_2.png) [@luv.ak.tech](https://community.thunkable.com/u/luv.ak.tech)\
**Post date:** [February 12, 2021, 10:39am UTC](https://community.thunkable.com/t/how-to-build-a-calculator/1093730/18 "2021-02-12T10:39:41Z")

</div>

oh good

---

<div class="post-metadata">

**Author:** ![virajkhanna4ade](https://avatars.discourse-cdn.com/v4/letter/v/5e9695/32.png) [@virajkhanna4ade](https://community.thunkable.com/u/virajkhanna4ade)\
**Post date:** [February 12, 2021, 11:02am UTC](https://community.thunkable.com/t/how-to-build-a-calculator/1093730/19 "2021-02-12T11:02:53Z")

</div>

Thanks

---

<div class="post-metadata">

**Author:** ![eko.devs.apploroceo](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/eko.devs.apploroceo/32/93147_2.png) [@eko.devs.apploroceo](https://community.thunkable.com/u/eko.devs.apploroceo)\
**Post date:** [February 12, 2021, 11:39am UTC](https://community.thunkable.com/t/how-to-build-a-calculator/1093730/20 "2021-02-12T11:39:39Z")

</div>

done with ui almost

 ![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/e/3/e38d26c0819a7d9af372a8bf51a40b21cb731d14.png)

[Next page](https://community.thunkable.com/t/how-to-build-a-calculator/1093730.md?page=2)
