Coderhouse goes global

🌍

Read more

Mean vs Median vs Mode: How Data Analysts Choose the Right Average

AI Engineering

Build and ship real applications with LLMs, agents and automation.

8 weeks · Live online · View course →

Data Analytics

Go from zero to job-ready analyst with SQL, Python and BI tools.

10 weeks · Live online · View course →

Dan Patiño

AI Strategy & Innovation at Coderhouse

Data

Mean vs Median vs Mode: How Data Analysts Choose the Right Average

Mean vs Median vs Mode: How Data Analysts Choose the Right Average

Mean, median and mode are the three most common ways to describe the "typical" value in a dataset. The mean is the arithmetic average: add all values and divide by how many there are. The median is the middle value when the data is sorted. The mode is the value that appears most often.

It matters because the "average" you report can change the story. Average order value, typical salary, usual delivery time: each can look very different depending on which measure you choose. Data analysts pick the measure that best represents the data and the decision, and they explain why.

How to calculate each one

Take the daily orders for one week: 12, 15, 15, 18, 20, 22, 95.

  • Mean: (12 + 15 + 15 + 18 + 20 + 22 + 95) / 7 = 197 / 7 ≈ 28.1 orders.

  • Median: the sorted middle value (the 4th of 7) = 18 orders.

  • Mode: 15 appears twice, so the mode is 15 orders.

One unusual day with 95 orders pulls the mean far above what a normal day looks like, while the median and mode barely notice it. With an even number of values, the median is the average of the two middle values. A dataset can have no mode, one mode or several modes.

For formal definitions, the NIST/SEMATECH e-Handbook of Statistical Methods covers measures of location in detail, and Khan Academy has worked practice problems.

Mean vs median: the skewness question

The key difference is sensitivity to extreme values. The mean uses every value's size, so a few very large or very small numbers move it. The median only depends on order, so it resists extremes.

  • Symmetric data (like many measurement errors): mean and median are close, and the mean is usually preferred.

  • Right-skewed data (income, house prices, order values, session duration): a long tail of high values pushes the mean above the median.

  • Left-skewed data (scores on an easy exam): a tail of low values pulls the mean below the median.

OpenStax's Introductory Statistics chapter on skewness shows this relationship with examples. It is also why official statistics on household income, such as those from the U.S. Census Bureau, commonly report the median: a small number of very high incomes would distort the mean.

When to use each measure

Use the mean when

  • The data is roughly symmetric with no extreme outliers.

  • You need totals to add up: mean revenue per user times users equals total revenue.

  • You plan further calculations such as standard deviation, t-tests or regression, which are built around the mean.

Use the median when

  • The data is skewed or has outliers: salaries, prices, response times, time on page.

  • You want to describe what a typical customer experiences, not the total.

  • Your data has a few errors you cannot clean yet, since the median is less sensitive to them.

Use the mode when

  • The data is categorical: most common product, plan, country or support reason.

  • You need the most frequent option, such as the most popular shoe size to stock.

  • The distribution has several peaks, which can reveal distinct customer groups.

How data analysts compute them in practice

  • Spreadsheets: AVERAGE(), MEDIAN() and MODE() (or MODE.SNGL() / MODE.MULT() in Excel).

  • SQL: AVG(column) for the mean; many databases offer PERCENTILE_CONT(0.5) WITHIN GROUP (ORDER BY column) or a MEDIAN() function; the mode is often a GROUP BY with COUNT(*) ordered descending.

  • Python (pandas): df["col"].mean(), .median() and .mode().

Reporting tips

  • Show more than one number. Reporting mean and median together instantly signals skew to your audience.

  • Add spread. A center without variability hides risk; pair it with standard deviation, interquartile range or percentiles.

  • Check outliers first. Decide whether extreme values are errors, rare events or the real story. See our guide on how analysts detect and handle outliers.

  • Name the measure. Write "median order value" instead of just "average", so nobody misreads it.

  • Segment. A single average across very different groups can describe nobody well; split by plan, region or channel.

FAQ

Which is better, mean or median?

Neither is better in general. Use the mean for symmetric data and when totals matter; use the median for skewed data or when outliers are present.

Can the mean, median and mode be the same?

Yes. In a perfectly symmetric distribution with one peak, such as the normal distribution, all three coincide.

Why is my mean much higher than my median?

Your data is probably right-skewed: a small number of large values is pulling the mean up. Look at those values before reporting.

Keep learning with Coderhouse

Choosing the right summary statistic is one of the first habits of a trustworthy analyst. Explore the path that fits your goals:

Dan Patiño

I'm Dan Patiño, head of AI Strategy & Innovation at Coderhouse. My day-to-day work involves merging the tactical management of e-commerce (CRO, Email Marketing and SEO) with the development of disruptive solutions. I specialize in building internal AI-powered apps to automate tasks and boost innovation within the team. I firmly believe that technology is strategy's best ally. To dive deeper into my professional journey, I'll be waiting for you on my LinkedIn profile.