Inline calculator textbox inspired from cell box on office spreadsheet
Include inline-calc.js on your page before end of body tag
<script src="path-to-inline-calc-js" type="text/javascript"></script>
Then just add class calc and data attribut for currency format data="N" or data="S"
<input type="text" class="calc" data="N"/>
To using round decimal add format data="N-2" for 2 decimal place
<input type="text" class="calc" data="N-2"/>