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
Copyright 1991-1994, 1997, 1998, 2000 Free Software Foundation, Inc.
This is free software with ABSOLUTELY NO WARRANTY.
For details type `warranty’.