Home / Insights / Tally inventory analytics

₹8.8 lakh was sitting on a pharmacy's shelves. Tally already knew.

A Chandigarh pharmacy with 4,800+ SKUs thought its costs were too high and couldn't say why. The answer was in its Tally exports the whole time.

Published 2026-11-28 · 6 min read

The owner of a pharmacy in Chandigarh had a feeling that costs were too high. Not a number, just a feeling. Five or six staff, open six days a week, a shop in a mixed office and shopping area. Everything ran through Tally, and nobody had ever sat down and asked the data what was going on.

That's most small retail, honestly. The data exists. It just lives in a format nobody reads.

We got twelve months of it, April 2023 to March 2024, and spent a few weeks finding out where the money was going. Here's what turned up.

Step zero: unmixing the ledger

Sales and purchases were sitting in one shared Tally ledger. Before any analysis, we had to split that into clean sales, purchase and stock tables. It's the least exciting part of the whole project and it decides whether everything after it is right or wrong. Most of the "insight" in a project like this comes from doing this step properly.

Summer is slow, and Sundays barely exist

First pass: demand by season. Summer weekdays sold roughly 40 to 50 percent less than winter weekdays. Saturdays were well below the other weekdays. Sundays were close to zero.

The range of products moved too. 3,455 SKUs sold at all in summer, against 4,373 in winter. About 2,100 SKUs sold in all three seasons, and that's the real stable core of the shop. Everything else comes and goes with the weather.

Products sold by season
Distinct SKUs with at least one sale
SummerWinterAll seasons

Summer weekdays ran 40–50% below winter.

It's a small-basket business

About 41% of orders were under ₹50. About 60% were under ₹100, and roughly 79% were under ₹200.

We ran k-means on the orders to see if there were natural groups. There were three, and they're very uneven:

  • around 69,700 small orders averaging ₹114
  • around 2,800 mid-size orders averaging ₹1,262
  • just 41 large orders averaging ₹9,612

So when you hear "customer", think of someone buying a few strips of something for ₹114. Staffing, discounts and pricing should be built around that person, not around the rare ₹9,612 order.

Three kinds of order
k-means clusters of every bill, by average order value
Everyday: ~69,700 orders₹114
Bulk: ~2,800 orders₹1,262
Institutional: 41 orders₹9,612

96% of bills sit in the everyday cluster. The 41 large ones are worth tracking by name.

Then we looked at the shelves

This is where it got uncomfortable. We used a simple rule: a SKU is overstocked if it holds more than 30 days of cover. On 31 March 2024, 64% of SKUs were over that line. Their value was ₹8.8 lakh, about half of the shop's closing stock.

Only 9.2% of SKUs were at a sensible level, and 0.2% were understocked. Basically nothing was running out. Everything was piling up.

Worse, 26.5% of SKUs sold nothing at all between December and March. Those were off-season items that kept getting bought as if the season hadn't changed.

Where the margin went

Overall margin was about 20%, with roughly 1% lost to write-downs. The monthly picture was more revealing. December fell to 14.1% because off-season stock was being cleared at a loss. April and May, at 18.2% and 17.3%, were still paying for the winter hangover. And purchases outran sales in April, May and June, right as summer demand dropped.

Same pattern, three months in a row: buying for the previous season.

The supplier detail that changes the math

About 47% of SKUs had a single supplier. That's a risk: weak negotiating position, and one missed delivery leaves a gap on the shelf.

But here's the useful part. The shop gets replenished in one day. If a restock takes a day, you don't need a month of stock to feel safe. The short lead time was already paid for. The shop just wasn't using it.

Stock health at March 2024
Share of products by stock cover
OverIdealUnder
Gross margin by month
Overall margin was about 20%; off-season clearance pulled these months down
DecAprMay
Orders by size
Cumulative share of all orders
Under ₹5041%
Under ₹10060%
Under ₹20079%

A small-basket shop: the typical order averaged ₹114.

What we told them to do

  • Cut stock cover from 30 days to about 15, since replenishment takes one day.
  • Flag off-season SKUs before the season turns, and stop reordering them.
  • Get a second supplier for single-source items, fast movers first.
  • Widen the summer range with things that actually sell in summer, and try tiered discounts to lift basket size.

The tool

The owner already lives in Tally, so we didn't ask them to move anywhere. We built a small Python and Streamlit app. You upload a Tally stock-summary export in Excel, it cleans the file, and sorts every SKU into unsold, overstocked, ideal or understocked, based on the number of cover days you choose. That's it. Upload, look, decide.

What we'd do next

Everything above is descriptive analytics plus clustering. The obvious next step is per-SKU demand forecasting that understands seasonality, with reorder points built from the one-day lead time, and ABC/XYZ classification so attention goes to the SKUs that move the money. We'd check any forecast against months it hasn't seen before trusting it.

If you're running a shop on Tally and your gut says something is off, send us an export. Twelve months of data is usually enough to find the problem.

Start with a five-day Health Check or Cost Audit.

Fixed scope, fixed fee, a scored report and a 90-day plan. We reply within 48 hours and sign an NDA before you share anything sensitive.

Book an MLOps Health CheckGet an LLM Cost AuditContact usFree readiness score
Get your readiness score