Zerodha Intraday P&L Calculator
A production-grade desktop utility to compute accurate intraday profit & loss for Zerodha trades, including brokerage, statutory charges, net P&L, and break-even analysis.
Overview
Problem context and design intent
Retail traders often rely on spreadsheets or online calculators that provide incomplete or opaque intraday P&L calculations. This leads to inaccurate expectations around profitability, charges, and break-even points.
This application was built to provide a transparent, deterministic, and locally executable solution that mirrors Zerodha’s intraday charge structure while remaining fast, reliable, and testable.
Key Capabilities
Core features and engineering strengths
- Accurate intraday P&L computation for Zerodha trades
- Detailed brokerage and statutory charge breakdown
- Net profit / loss calculation
- Break-even price analysis
- Portfolio-level aggregation for multiple trades
- Clean, responsive desktop GUI
Architecture & Execution
How the system is structured and delivered
The application is built using a layered architecture where business logic is isolated from the user interface. All financial calculations are implemented as pure, deterministic functions with unit test coverage.
The desktop interface is implemented using Python and Tkinter, while the core calculation engine is independently testable and reusable. The application is packaged as a standalone Windows executable using PyInstaller for zero-dependency execution.
Quality & Reliability
Validation, correctness, and maintainability
The calculation engine is fully unit-tested using pytest, ensuring correctness across charge scenarios, edge cases, and rounding behavior.
This approach ensures long-term maintainability and allows charge models or brokerage rules to evolve without impacting the user interface or application stability.