Fixing of Invested Value Mismatch due to Decimal Precision

Overview of the Issue
Earlier, some users noticed a mismatch between the total invested amount (sum of all buy transactions) and the invested value displayed on the Portfolio and Transaction screens.
This mismatch occurred because of the calculation method used:
- We added the invested amounts from all buy transactions of a stock.
- We divided this total by the total quantity to calculate the Weighted Average Price (WAP).
- The WAP was rounded to two decimals.
- The rounded WAP was then multiplied with the quantity received from the CDSL file to display the invested value.
When the quantity was large, even a minor rounding difference resulted in a noticeable mismatch in the final invested value.
Resolution
- We now avoid rounding the WAP after calculation.
- The full-precision WAP is multiplied with the CDSL quantity.
- Only the final invested value is rounded for display.
This ensures the displayed invested value exactly matches the sum of all transactions.
Example
A. Transaction Details
| Date | Qty | Avg Price | Amount |
| 20/6/25 | 35,362 | 83.75 | 29,61,699.15 |
| 20/6/3 | 64,732 | 86.52 | 56,00,832.73 |
| 20/6/4 | 5,132 | 87.75 | 4,50,352.11 |
| 20/6/5 | 24,152 | 85.36 | 20,61,704.08 |
| 20/6/6 | 25,376 | 91.85 | 23,30,663.80 |
| Total | 154,754 | — | 1,34,05,251.87 |
B. Weighted Average Price (WAP)
| Description | Value |
| Total Invested Amount | 1,34,05,251.87 |
| Total Quantity | 1,54,754 |
| WAP (unrounded) | 86.62297495 |
| WAP rounded (old method) | 86.62 |
C. Invested Value Shown
| Process | Formula | Displayed Value |
| Old Method (round WAP → multiply) | 86.62 × 154,754 | 1,34,04,791.48 |
| New Method (use full-precision WAP) | 86.62297495 × 154,754 | 1,34,05,251.87 |
D. Difference
| Item | Amount |
| Mismatch due to rounding | ₹460.39 |
Disclaimers:
“This is for educational /Informational purposes only.”
“Investments in securities market are subject to market risks, read all the related documents carefully before investing”
“Mutual Fund investments are subject to market risks, read all scheme related documents carefully”
“Past performance is no guarantee of future results. ”
“Mutual Funds do not have a fixed rate of return, and it is not possible to predict the rate of return”
Published on: Dec 19, 2025, 12:14 PM IST

Team Angel One
- Angel One Integrates TradingView Access for Clients: Here is What the New Trading Setup Includes
- Angel One and ClearTax Are Making Sure Your FY26 Tax Filing Is One Less Thing to Worry About
- Market Price Protection (MPP) on Angel One: Safeguarding Your Orders
- Angel One explains how to start trading in 1 hour
- Explore the power of ARQ – The revolutionary investment engine by Angel One


