.irs-mileage-calculator {
font-family: sans-serif;
border: 1px solid #ddd;
padding: 20px;
border-radius: 8px;
max-width: 600px;
margin: 20px auto;
background-color: #f9f9f9;
}
.irs-mileage-calculator label {
display: block;
margin-bottom: 8px;
font-weight: bold;
color: #333;
}
.irs-mileage-calculator input[type="number"] {
width: calc(100% – 22px);
padding: 10px;
margin-bottom: 15px;
border: 1px solid #ccc;
border-radius: 4px;
box-sizing: border-box;
}
.irs-mileage-calculator button {
background-color: #4CAF50;
color: white;
padding: 12px 20px;
border: none;
border-radius: 4px;
cursor: pointer;
font-size: 16px;
margin-top: 10px;
}
.irs-mileage-calculator button:hover {
background-color: #45a049;
}
.irs-mileage-calculator #result {
margin-top: 20px;
padding: 15px;
background-color: #e0f7fa;
border: 1px solid #00bcd4;
border-radius: 4px;
font-size: 18px;
color: #00796b;
text-align: center;
}
.irs-mileage-calculator h2 {
text-align: center;
color: #2c3e50;
margin-bottom: 20px;
}
.irs-mileage-calculator p {
line-height: 1.6;
color: #555;
}
.irs-mileage-calculator strong {
color: #333;
}
function calculateMileageDeduction() {
var businessMiles = parseFloat(document.getElementById("businessMiles").value);
var medicalMiles = parseFloat(document.getElementById("medicalMiles").value);
var movingMiles = parseFloat(document.getElementById("movingMiles").value);
var businessRate = 0.67; // 2024 Business Mileage Rate
var medicalRate = 0.21; // 2024 Medical Mileage Rate
var movingRate = 0.21; // 2024 Moving Mileage Rate (Military Only)
var totalDeduction = 0;
if (!isNaN(businessMiles) && businessMiles >= 0) {
totalDeduction += businessMiles * businessRate;
}
if (!isNaN(medicalMiles) && medicalMiles >= 0) {
totalDeduction += medicalMiles * medicalRate;
}
if (!isNaN(movingMiles) && movingMiles >= 0) {
totalDeduction += movingMiles * movingRate;
}
var resultDiv = document.getElementById("result");
if (totalDeduction > 0) {
resultDiv.innerHTML = "Your estimated tax deduction is: $" + totalDeduction.toFixed(2);
} else if (isNaN(businessMiles) && isNaN(medicalMiles) && isNaN(movingMiles)) {
resultDiv.innerHTML = "Please enter valid numbers for miles driven.";
} else {
resultDiv.innerHTML = "Your estimated tax deduction is: $0.00";
}
}
IRS Mileage Rate Deduction Calculator 2024
The IRS mileage rate is a crucial figure for individuals and businesses who use their personal vehicles for business purposes. This rate allows you to deduct a certain amount per mile driven for business, medical, or moving expenses. For 2024, the IRS has set specific rates. This calculator helps you estimate your potential tax deduction based on the miles you've driven and the applicable rate.
Understanding the 2024 IRS Mileage Rates:
- Business Miles: This is the most common category. It covers miles driven for conducting business, traveling to meet clients, or attending business meetings. The rate for 2024 is 67 cents per mile.
- Medical Miles: For miles driven to and from medical appointments or treatments that are deductible under IRS rules. The rate for 2024 is 21 cents per mile.
- Moving Miles: For members of the U.S. Armed Forces on active duty who are relocating due to a permanent change of station. The rate for 2024 is 21 cents per mile.
Simply enter the number of miles you've driven for each category, and the calculator will compute your estimated deduction. Remember to keep accurate records of your mileage!