# Calculator

**URL:** <https://forum.kirupa.com/t/calculator/90946>\
**Category:** Uncategorized\
**Created:** [March 3, 2003, 1:36am UTC](https://forum.kirupa.com/t/calculator/90946 "2003-03-03T01:36:06Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![nobody](https://avatars.discourse-cdn.com/v4/letter/n/94ad74/32.png) [@nobody](https://forum.kirupa.com/u/nobody)\
**Post date:** [March 3, 2003, 1:36am UTC](https://forum.kirupa.com/t/calculator/90946/1 "2003-03-03T01:36:06Z")

</div>

```php
half_btn.onRelease = function() {
	output1 = input1/2;
};

```

i have that applied to a button… but instead of dividing the input data in half… it subtracts 2… any ideas why?
