Deshmaj Car Rental Calculator

let lastData = "";
function calc(){
let car = parseFloat(document.getElementById("car").value); let mode = document.getElementById("mode").value; let time = parseFloat(document.getElementById("time").value); let km = parseFloat(document.getElementById("km").value); let fuel = parseFloat(document.getElementById("fuel").value); let extra = parseFloat(document.getElementById("extra").value); let coupon = document.getElementById("coupon").value.trim();
if(isNaN(time) || isNaN(km) || isNaN(fuel)){ alert("Fill all fields!"); return; }
// base cost let baseRate = mode==="day" ? car : car/24; let base = baseRate * time;
// distance cost let fuelCost = km * fuel;
// extra cost let extraCost = extra * time;
let total = base + fuelCost + extraCost;
// discount system let discount = 0; if(coupon === "DESH10"){ discount = total * 0.10; } else if(coupon === "DESH20"){ discount = total * 0.20; }
let finalTotal = total - discount;
let result = document.getElementById("result"); result.style.display = "block";
result.innerHTML = `
Base Cost: $${base.toFixed(2)}
Fuel Cost: $${fuelCost.toFixed(2)}
Extra Cost: $${extraCost.toFixed(2)}
Subtotal: $${total.toFixed(2)}
Discount: -$${discount.toFixed(2)}
Total Payable: $${finalTotal.toFixed(2)}
Coupon Applied: ${coupon || "None"}
`;
lastData = result.innerText;
// save history
localStorage.setItem(“lastRental”, lastData);
}
/* PDF Invoice */
function downloadPDF(){
const { jsPDF } = window.jspdf;
const pdf = new jsPDF();
pdf.text(“Deshmaj Car Rental Invoice”, 10, 10);
pdf.text(lastData || “No Data”, 10, 30);
pdf.save(“Deshmaj_Rental_Invoice.pdf”);
}
User Guide
The Deshmaj Car Rental Calculator is a powerful web-based tool designed to help users quickly estimate their total car rental cost with full transparency. It automatically calculates base rental charges, fuel expenses, extra services, discounts, and final payable amount, and even allows users to download a professional PDF invoice.
This guide will explain everything in detail so that any user—even a beginner—can easily understand and use the calculator efficiently.
🌟 What This Calculator Does
This car rental calculator is built to automate complex pricing calculations. Instead of manually calculating costs, users simply enter a few details, and the system instantly provides:
Base rental cost (daily or hourly)
Fuel cost based on distance
Extra services cost (driver, insurance, etc.)
Discount calculation using coupon codes
Final total payable amount
Downloadable PDF invoice
It is perfect for:
Car rental businesses
Travel agencies
Personal trip planning
Online booking websites
Blog or SaaS tools
🧭 Step-by-Step Usage Guide
🚘 Step 1: Select Car Type
The first option in the calculator is Car Type.
You will see multiple car categories such as:
✔ How it works:
Each car type has a fixed base rental price per day. When you select a car, the calculator automatically uses that price as the base rate.
👉 Example:
If you select SUV, the system will use $90/day as the base cost.
⏱ Step 2: Choose Rental Mode
Next, you must select the Rental Mode:
Per Day
Per Hour (÷24 rate)
✔ Explanation:
If you choose Per Day, full daily charges are applied.
If you choose Per Hour, the system divides the daily rate by 24 to calculate hourly cost.
👉 Example:
SUV = $90/day
Hourly rate = $90 ÷ 24 = $3.75/hour
This gives users flexibility depending on their rental needs.
📅 Step 3: Enter Duration (Days or Hours)
In this field, you must enter how long you want to rent the car.
If you selected Per Day, enter number of days.
If you selected Per Hour, enter number of hours.
✔ Example:
3 days rental → enter3
10 hours rental → enter10
The system will multiply this value with the selected rate.
🛣 Step 4: Enter Distance (KM)
This field calculates fuel or travel cost based on distance.
✔ How it works:
The system multiplies:
Distance (KM) × Fuel Cost per KM
👉 Example:
Distance = 120 KM
Fuel rate = $0.50 per KM
Fuel cost = 120 × 0.50 = $60
This ensures accurate travel expense calculation.
⛽ Step 5: Fuel Cost per KM
Here you define how much fuel costs per kilometer.
This value depends on:
Fuel prices in your area
Vehicle type efficiency
Trip conditions
✔ Example values:
$0.30 (low consumption car)
$0.50 (average)
$0.80 (luxury SUV or long travel)
🧾 Step 6: Add Extra Services
The calculator also supports additional services, such as:
No Extra Services
Driver ($20/day)
Insurance ($30/day)
Driver + Insurance ($50/day)
✔ How it works:
These charges are multiplied by the number of rental days or hours.
👉 Example:
If you choose Driver + Insurance:
Extra cost = $50 × duration
This allows users to customize their rental package.
🎟 Step 7: Enter Coupon Code (Optional)
You can apply discount coupons to reduce the final price.
✔ Available coupons:
-
DESH10→ 10% discount
-
DESH20→ 20% discount
✔ Example:
If total bill is $200 and you apply:
DESH10 → save $20
DESH20 → save $40
If no coupon is entered, no discount is applied.
🧮 Step 8: Click “Calculate Invoice”
After filling all fields, click:
👉 Calculate Invoice
The system will instantly display:
Base Cost
Fuel Cost
Extra Services Cost
Subtotal
Discount
Final Total Payable
✔ Example Output:
You will see a clean breakdown like:
Base Cost: $180.00
Fuel Cost: $60.00
Extra Cost: $40.00
Subtotal: $280.00
Discount: -$28.00
Total Payable: $252.00
This makes pricing fully transparent.
📄 Step 9: Download PDF Invoice
Once calculation is complete, you can download a professional invoice.
👉 Click:
Download PDF Invoice
✔ What the PDF includes:
Title: Deshmaj Car Rental Invoice
Complete cost breakdown
Final payable amount
This is useful for:
Business billing
Customer receipts
Record keeping
Printing invoices
💾 Step 10: Saved History Feature
The calculator automatically saves the last calculation in the browser using localStorage.
✔ Benefits:
You can revisit your last calculation anytime
No need to re-enter data
Fast comparison for different trips
🔥 Key Features Summary
This calculator is powerful because it includes:
✔ Multi-car pricing system
✔ Hourly and daily rental modes
✔ Fuel cost automation
✔ Extra service billing
✔ Discount coupon system
✔ Real-time calculation
✔ PDF invoice generator
✔ Saved history feature
🚀 Who Should Use This Tool?
This tool is ideal for:
Car rental companies
Travel agencies
Transport startups
Website owners (SaaS tools)
Freelancers building booking systems
Personal travel planners
🎯 Final Conclusion
The Deshmaj Car Rental Calculator is a complete rental pricing solution that removes manual calculation errors and saves time. It provides accurate cost estimation, flexible pricing options, and professional invoice generation—all in one simple interface.
Whether you are a business owner or a traveler, this tool makes rental pricing fast, transparent, and professional.





Leave a Reply