Here what bc, a command line calculator, comes in handy.
In this short tutorial, I will show how to do some basic calculation with bc.
First launch bc by typing bc and hitting enter. You will see bc ready to take your commands.
[root@kartook ~]# bc
bc 1.06
Copyright 1991-1994, 1997, 1998, 2000 Free Software Foundation, Inc.
This is free software with ABSOLUTELY NO WARRANTY.
For details type `warranty’.
18+18
36100-99
1100*100
1000010*2-100+52
-28