Your Credit Utilization Rate
Enter your credit limit and balance to see your utilization rate.
.calculator-wrapper {
font-family: sans-serif;
max-width: 600px;
margin: 20px auto;
padding: 20px;
border: 1px solid #ccc;
border-radius: 8px;
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}
.calculator-form h2 {
text-align: center;
margin-bottom: 15px;
color: #333;
}
.calculator-form p {
text-align: center;
margin-bottom: 25px;
color: #555;
font-size: 0.9em;
line-height: 1.5;
}
.form-group {
margin-bottom: 15px;
}
.form-group label {
display: block;
margin-bottom: 5px;
font-weight: bold;
color: #444;
}
.form-group input[type="number"] {
width: calc(100% – 22px);
padding: 10px;
border: 1px solid #ccc;
border-radius: 4px;
font-size: 1em;
}
.form-group small {
display: block;
margin-top: 5px;
color: #777;
font-size: 0.8em;
}
.calculator-form button {
display: block;
width: 100%;
padding: 12px;
background-color: #007bff;
color: white;
border: none;
border-radius: 4px;
font-size: 1.1em;
cursor: pointer;
transition: background-color 0.3s ease;
}
.calculator-form button:hover {
background-color: #0056b3;
}
.calculator-result {
margin-top: 30px;
padding: 20px;
background-color: #e9ecef;
border-radius: 4px;
text-align: center;
}
.calculator-result h3 {
margin-bottom: 10px;
color: #333;
}
#utilizationRateOutput {
font-size: 1.5em;
font-weight: bold;
color: #28a745; /* Green for positive result */
}
function calculateUtilization() {
var totalCreditLimit = parseFloat(document.getElementById("totalCreditLimit").value);
var currentBalance = parseFloat(document.getElementById("currentBalance").value);
var utilizationRateOutput = document.getElementById("utilizationRateOutput");
if (isNaN(totalCreditLimit) || isNaN(currentBalance) || totalCreditLimit 30) {
utilizationRateOutput.style.color = "#ffc107"; /* Yellow for caution */
} else {
utilizationRateOutput.style.color = "#28a745"; /* Green for good */
}
}
}