A first try my $width = 30; my $length = 50; my $radius = 10; my $rate = 1000; my $cost = ($rate/10000) * (0.3048*$width*0.3048*$length - 3.14159 * ($radius * 0.0254) **2); print "Cost is: $cost\n";