WA Comprehensive Tax Calculator
Info
Created On: August 28, 2023
Created By:
AI
Model: chatgpt-plugin
Time: 0 seconds
Prompt Tokens: 0
Completion Tokens: 0
Total Token Cost: 0
Get This App On Your Website
Copy Code
1. Copy the code above with the iframe and link.
2. Paste the code into your website.
3. Resize the iframe to fit your website.
Javascript, HTML, CSS Code
Copy
<!DOCTYPE html>
<html>
<head>
<script type="text/javascript"> window.addEventListener('error', function(event) { var message = JSON.parse(JSON.stringify(event.message)); var source = event.filename; var lineno = event.lineno; var colno = event.colno; var error = event.error; window.parent.postMessage({ type: 'iframeError', details: { message: message, source: source, lineno: lineno, colno: colno, error: error ? error.stack : '' } }, '*'); }); window.addEventListener('unhandledrejection', function(event) { window.parent.postMessage({ type: 'iframePromiseRejection', details: { reason: event.reason } }, '*'); }); </script>
<title>WA Comprehensive Tax Calculator</title>
<meta name='description' content='A comprehensive calculator to estimate federal income, self-employment, B&O, and capital gains taxes for Washington residents.'>
<meta name='keywords' content='Washington, Self-Employment, Income Tax, B&O Tax, Capital Gains, Calculator'>
<style>
body {
font-family: Arial, sans-serif;
}
.container {
max-width: 600px;
margin: auto;
padding: 20px;
text-align: center;
}
input[type='number'] {
width: 100%;
padding: 12px;
margin: 8px 0;
box-sizing: border-box;
}
button {
background-color: #4CAF50;
color: white;
padding: 14px 20px;
margin: 8px 0;
border: none;
cursor: pointer;
}
#result {
margin-top: 20px;
font-size: 24px;
}
</style>
<link rel="canonical" href="https://calculator.tools/prompt/5215/">
<meta charset="utf-8">
</head>
<body>
<div class='container'>
<h1>WA Comprehensive Tax Calculator</h1>
<p>Enter your net earnings from self-employment:</p>
<input type='number' id='netEarnings' placeholder='Net Earnings' min='0'>
<p>Enter your capital gains:</p>
<input type='number' id='capitalGains' placeholder='Capital Gains' min='0'>
<button onclick='calculateTax()'>Calculate</button>
<div id='result'></div>
</div>
<script>
function calculateTax() {
const netEarnings = parseFloat(document.getElementById('netEarnings').value);
const capitalGains = parseFloat(document.getElementById('capitalGains').value);
if (isNaN(netEarnings) || isNaN(capitalGains)) {
document.getElementById('result').innerText = 'Please enter valid numbers.';
return;
}
const socialSecurityRate = 0.124;
const medicareRate = 0.029;
const totalRate = socialSecurityRate + medicareRate;
let selfEmploymentTax = netEarnings * totalRate;
// Federal income tax (simplified, assuming 22% rate)
let federalIncomeTax = netEarnings * 0.22;
// Washington B&O Tax (assuming 1.5% rate)
let boTax = netEarnings * 0.015;
// Washington Capital Gains Tax (7%)
let capitalGainsTax = capitalGains * 0.07;
document.getElementById('result').innerText = `Estimated Self-Employment Tax: $${selfEmploymentTax.toFixed(2)}\nEstimated Federal Income Tax: $${federalIncomeTax.toFixed(2)}\nEstimated WA B&O Tax: $${boTax.toFixed(2)}\nEstimated WA Capital Gains Tax: $${capitalGainsTax.toFixed(2)}`;
}
</script>
<script type="text/javascript"> var localStoragePrefix = "ct-{{ cachebreaker }}"; var lastSave = 0; function saveLocal(data) { if (Date.now() - lastSave < 1000) { return; } let cookie = localStoragePrefix + "=" + JSON.stringify(data) + "; path=" + window.location.pathname + "'; SameSite=Strict"; cookie += "; expires=" + new Date(Date.now() + 1000 * 60 * 60 * 24 * 365 * 1000).toUTCString(); document.cookie = cookie; lastSave = Date.now(); } function loadLocal() { var cookiePrefix = localStoragePrefix + "="; var cookieStart = document.cookie.indexOf(cookiePrefix); if (cookieStart > -1) { let cookieEnd = document.cookie.indexOf(";", cookieStart); if (cookieEnd == -1) { cookieEnd = document.cookie.length; } var cookieData = document.cookie.substring(cookieStart + cookiePrefix.length, cookieEnd); return JSON.parse(cookieData); } } </script>
<script type="text/javascript"> window.addEventListener('load', function() { var observer = new MutationObserver(function() { window.parent.postMessage({height: document.documentElement.scrollHeight || document.body.scrollHeight},"*"); }); observer.observe(document.body, {attributes: true, childList: true, subtree: true}); window.parent.postMessage({height: document.documentElement.scrollHeight || document.body.scrollHeight},"*"); }); </script>
</body>
</html>