Calculator Tools Calculator Tools
Create

Perbandingan Value terhadap MBG

Mar 29, 2026

About this app

Aplikasi untuk menghitung perbandingan suatu value terhadap MBG (Metode Budaya Gmentioned).

Perbandingan Value terhadap MBG ⚖️ Menghitung Perbandingan Value terhadap MBG 💰 Hitung Perbandingan 📊

Related apps

Put this on your site

Source

                    <html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width,initial-scale=1">

<title>Perbandingan Value terhadap MBG</title>
<meta name="description" content="Aplikasi untuk menghitung perbandingan suatu value terhadap MBG (Metode Budaya Gmentioned).">
<meta name="keywords" content="Value, MBG, perbandingan, aplikasi, hitung">

<!-- Libraries -->
<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Poppins:wght@400;700&display=swap">
<style>
body {
background: linear-gradient(to right, #ff7e5f, #feb47b);
color: white;
font-family: 'Poppins', sans-serif;
}
#main-container {
margin-top: 50px;
padding: 30px;
border-radius: 15px;
background-color: rgba(255, 255, 255, 0.1);
box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}
h2 {
font-size: 2em;
}
.input-field {
margin-bottom: 15px;
}
button {
background-color: #ff6f61;
color: white;
font-size: 18px;
transition: all 0.3s ease;
}
button:hover {
background-color: #ff4f31;
transform: scale(1.05);
}
.emoji {
font-size: 40px;
}
</style>
<script type="text/javascript">
function saveLocal() {
const valueInput = document.getElementById('valueInput').value;
const mbgInput = document.getElementById('mbgInput').value;
localStorage.setItem('valueInput', valueInput);
localStorage.setItem('mbgInput', mbgInput);
}

function loadLocal() {
const valueInput = localStorage.getItem('valueInput');
const mbgInput = localStorage.getItem('mbgInput');
if (valueInput) document.getElementById('valueInput').value = valueInput;
if (mbgInput) document.getElementById('mbgInput').value = mbgInput;
}

document.addEventListener("DOMContentLoaded", function() {
loadLocal();
const calculateButton = document.getElementById('calculateButton');
const resultArea = document.getElementById('resultArea');

calculateButton.addEventListener('click', function() {
const valueInput = parseFloat(document.getElementById('valueInput').value);
const mbgInput = 1e12; // 1 trillion

if (!isNaN(valueInput) && mbgInput !== 0) {
const ratio = valueInput / mbgInput;
resultArea.innerHTML = `Hasil perbandingan Value terhadap MBG adalah: <strong>${ratio.toFixed(10)}</strong>`;
} else {
alert("Masukkan nilai yang valid.");
resultArea.innerHTML = '';
}
saveLocal();
});
});
</script>
</head>
<body>
<div id="main-container" class="container text-center">
<h2><span class="emoji">⚖️</span> Menghitung Perbandingan Value terhadap MBG <span class="emoji">💰</span></h2>
<div class="input-field">
<input type="number" id="valueInput" class="form-control" placeholder="Masukkan Value" required>
</div>
<div class="input-field">
<input type="number" id="mbgInput" class="form-control" placeholder="1 hari MBG = 1 Triliun" value="1000000000000" readonly>
</div>
<button id="calculateButton" class="btn btn-lg">Hitung Perbandingan 📊</button>
<div id="resultArea" class="mt-3"></div>
</div>
</body>
</html>