A lightweight, beginner-friendly Python invoice generator that computes item totals, applies automatic tax, and prints a clean, formatted invoice — all in seconds.
Simple Invoice Generator is a console-based Python application designed for learning and practical use. It allows you to build an invoice by adding line items, then automatically calculates subtotals, taxes, and a grand total — printing a neatly formatted receipt to the terminal.
| Feature | Description |
|---|---|
| 📦 Multi-item support | Add as many products/services as needed |
| 🔢 Quantity & price tracking | Specify quantity and unit price per item |
| ➕ Subtotal calculation | Automatically sums all line-item totals |
| 💸 Auto tax calculation | Applies an 8% tax rate on the subtotal |
| 🧮 Grand total | Displays the final amount including tax |
| 📅 Date stamping | Automatically adds today's date to every invoice |
| 🖨️ Formatted output | Clean, aligned, console-friendly invoice layout |
| Component | Detail |
|---|---|
| Language | Python 3.x |
| Application Type | Console / CLI |
| Standard Libraries | datetime |
| Dependencies | None — zero third-party packages required |
- Python 3.x installed on your system
-
Clone the repository
git clone https://github.com/xainy75/Simple-Invoice-Generator.git cd Simple-Invoice-Generator -
Run the script
python "invoice system.py"
No virtual environment or package installation required — the app uses only Python's standard library.
You can customise the invoice by editing the __main__ block at the bottom of invoice system.py:
# Create an invoice for a client
my_invoice = InvoiceSystem("Alice Wonderland")
# Add line items: (item name, quantity, unit price)
my_invoice.add_item("Mechanical Keyboard", 1, 120.00)
my_invoice.add_item("USB-C Cable", 3, 15.50)
my_invoice.add_item("Ergonomic Mouse", 1, 85.00)
# Print the formatted invoice
my_invoice.generate_invoice()You can also use InvoiceSystem programmatically in your own projects:
from invoice_system import InvoiceSystem
invoice = InvoiceSystem("John Doe")
invoice.add_item("Web Design", 1, 500.00)
invoice.add_item("Hosting (1 yr)", 1, 120.00)
invoice.generate_invoice()========================================
OFFICIAL INVOICE
========================================
Customer: Alice Wonderland
Date: 2026-01-30
----------------------------------------
Item Qty Price Total
Mechanical Keyboard 1 $120.00 $120.00
USB-C Cable 3 $15.50 $46.50
Ergonomic Mouse 1 $85.00 $85.00
----------------------------------------
Subtotal: $251.50
Tax (8%): $20.12
**GRAND TOTAL: $271.62**
========================================
Thank you for your business!
========================================
Zain Ul Abidin
- GitHub: @xainy75
Made with ❤️ in Python