|
.[
Home ].[ Up
]
Calculations
[Mathematical Operators]
Area of a rectangle
Circumference of a circle
Discount
Interest
Percentage that
VB will understand
Polygon's perimeter
Time
Volume

area = Pi
multiplied by radius to the 2nd power
area
= 3.141593 * radius ^ 2
Back
to Top

circumference
= diameter multiplied by Pi
circumference
= diameter * 3.141593
Back
to Top

area =
length multiplied by width
area
= length * width
Back
to Top

perimeter
= length multiplied by the number of sides, e.g. 4 or 6
perimeter
= length * number of sides
Back
to Top
volume
= height * width * depth
Back
to Top
To
convert hours, minutes and seconds into weeks, days and hours use the Modulus
Operator (Mod).
Example:
If 40 hours = 1 week, 8 hours = 1 day, and less than 8 hours = hours; calculate
how many weeks, days and hours it results in given the following data - an
employee worked 100 hours.
weeks =
194 hours \ 40
gives you 0 weeks
days =
(194 hours Mod 40) \ 8
gives you 4 days
hours =
(194 hours Mod 40) Mod 8 gives
you 4 hours
Back
to Top
Basic
interest calculation
Example:
Calculate the amount due on a loan of R25 000 @ 7.5% interest
(100
+ 7.5)/100 - 1 = 0.075 (percentage conversion to decimal)
R25
000 * (1 + 0.075) = R26 875 (amount due)
Another
method of doing this:
((R25
000 * 0.075) + R25 000) = R26 875
More
advanced interest calculation
To
calculate interest with certain parameters, use the Pmt function
Back
to Top
Basic
discount calculation
Example:
Calculate 12% discount on R743.50
(100
+ 12)/100 - 1 = 0.12 (percentage converted to
decimal)
R743.50
* 0.12 = R89.22 (discount amount) R743.50
- R89.22 = R654.28 (new total) Back
to Top
Basic
percentage conversion
Example:
To convert 5% to a decimal value (100
+ 5)/100 - 1 = 0.05 Back
to Top
|