# Numeric Calculator

**URL:** <https://community.blaze.today/t/numeric-calculator/68771>\
**Category:** Show and Tell\
**Created:** [October 23, 2026, 7:09pm UTC](https://community.blaze.today/t/numeric-calculator/68771 "2026-10-23T19:09:26Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![tonydow](https://community.blaze.today/user_avatar/community.blaze.today/tonydow/32/18761_2.png) [@tonydow](https://community.blaze.today/u/tonydow)\
**Post date:** [October 23, 2026, 7:09pm UTC](https://community.blaze.today/t/numeric-calculator/68771/1 "2026-10-23T19:09:26Z")

</div>

A simple calculator. My thanks to @samliew for the inspiration to create this.

{note: trim=left; insert=no; preview=yes; color=none}  
{repeat: for c in split(top, "|")}{button: text={=concat(text,c)}; label={=c}}{endrepeat}  
{repeat: for c in split(mid, "|")}{button: text={=concat(text,c)}; label={=c}}{endrepeat}  
{repeat: for c in split(bottom, "|")}{button: text={=concat(text,c)}; label={=c}}{endrepeat}  
{repeat: for c in split(zero, "|")}{button: text={=concat(text,c)}; label={=c}}{endrepeat}  
{repeat: for c in split(misc1, "|")}{button: text={=concat(text,c)}; label={=c}}{endrepeat}  
{repeat: for c in split(misc2, "|")}{button: text={=concat(text,c)}; label={=c}}{endrepeat}{endnote}  
{top="7|8|9"}{mid="4|5|6"}{bottom="1|2|3"}{zero="0|."}{misc1="+|-|\*|/"}{misc2="^|(|)"}  
{note}{formtext: name=text; default=0; cols=20}{endnote} Total = {=("() -\> " & text)(); format=,.2f} {button: text=0; label=Clear}

The {formmenu: default=sin; cos; tan; log; ln; sqrt; name=trig; cols=6}{result=catch(("() -\> " & text)(), "")} of {=result} = {if: trig = "sin"; trim=right}  
{=(sin(result)); format=,.6f}  
{elseif: trig = "cos"; trim=yes}  
{=(cos(result)); format=,.6f}  
{elseif: trig = "tan"; trim=yes}  
{=(tan(result)); format=,.6f}  
{elseif: trig = "log"; trim=yes}  
{=(log(result)); format=,.6f}  
{elseif: trig = "ln"; trim=yes}  
{=(ln(result)); format=,.6f}  
{elseif: trig = "sqrt"; trim=yes}  
{=(sqrt(result)); format=,.6f}  
{endif}

{formmenu: default=Binary; Octal; Hexadecimal; name=base; cols=15} {if: base = "Binary"; trim=right}  
{=base(result,2)}  
{elseif: base = "Octal"; trim=yes}  
{=base(result,8)}.  
{elseif: base = "Hexadecimal"; trim=yes}  
{=base(result,16)}  
{endif: trim=left}

Add or subtract a % to the total:  
{formtext: name=rate; cols=4}{t2=result \* rate / 100}{t3=catch(("() -\> " & t2)(), "")}%: Result: {=result+t3}
