forked from mmistakes/minimal-mistakes
-
Notifications
You must be signed in to change notification settings - Fork 0
/
strategy-cost-calculator.html
69 lines (53 loc) · 1.94 KB
/
strategy-cost-calculator.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Strategic Loss Calculator</title>
<style>
body {
font-family: Arial, sans-serif;
padding: 20px;
}
.input-group {
margin-bottom: 10px;
}
.result {
margin-top: 20px;
}
</style>
</head>
<body>
<h1>Strategic Loss Calculator</h1>
<div class="input-group">
<label for="numFTEs">Number of FTEs:</label><br>
<input type="number" id="numFTEs" placeholder="Enter number of FTEs" value=0>
</div>
<div class="input-group">
<label for="hourlyRate">Hourly Rate ($):</label><br>
<input type="number" id="hourlyRate" placeholder="Enter hourly rate" value=0>
</div>
<div class="input-group">
<label for="numWeeks">Number of Weeks:</label><br>
<input type="number" id="numWeeks" placeholder="Enter number of weeks" value=0>
</div>
<div class="input-group">
<label for="additionalResources">Additional Financial Resources ($):</label><br>
<input type="number" id="additionalResources" placeholder="Enter additional financial resources" value=0>
</div>
<button onclick="calculateResourceCost()">Calculate Cost</button>
<div class="result" id="result"></div>
<script>
function calculateResourceCost() {
var numFTEs = parseFloat(document.getElementById('numFTEs').value);
var hourlyRate = parseFloat(document.getElementById('hourlyRate').value);
var numWeeks = parseFloat(document.getElementById('numWeeks').value);
var additionalResources = parseFloat(document.getElementById('additionalResources').value);
var totalHours = numFTEs * 40 * numWeeks;
var manpowerCost = totalHours * hourlyRate;
var totalCost = manpowerCost + additionalResources;
document.getElementById('result').innerHTML = 'Estimated Cost of Resources Used: $' + totalCost.toFixed(2);
}
</script>
</body>
</html>