
Most of the math we use in charting is fundamental algebra and statistics. Yet most of us continue to make simple mistakes. Should we ever take an average of two percentages? How do we calculate percentage change: the new number minus the old number divided by the new number? Or divided by the old number? What is a log scale?
In addition to basic math skills, we also need knowledge of the market — the more, the better. What are the major stock indexes? How do we chart currency fluctuations that affect our global business?
These are all formulas and facts that save you time when you need to deliver quality work on a tight deadline. You will find them all here at your fingertips in this chapter.
Mean, median, and mode
Which should you use?
The mean, or average, uses every value in a data set. It works well when each observation should count the same. But very high or low values can pull it away from what is typical.
The median shows the middle of an ordered data set. Because extreme values have less effect on it, it is useful for uneven data, such as home prices or household incomes.
The mode shows the most common value or category. Use it when you want to show which result appears most often.
Definitions
The mean is found by adding all values and dividing by the number of data points.
The median is the middle value when the data is in numerical order. If the data set has an even number of observations, find the median by averaging the two middle values.
The mode is the value that appears most often. A data set can have more than one mode if several values share the top count.
Example: The following data set shows the number of cars sold in a day by each of nine divisions.

Standard deviation
Standard deviation shows how widely values are spread around the mean. For stock returns, a higher standard deviation means greater swings.

Example: In business, standard deviation is often used to measure price swings by looking at how much percent changes in prices vary over time.

For the quants:
Volatility is usually shown on an annual basis.
To calculate annualized volatility, follow these steps:
Find the standard deviation of daily returns.
Multiply this standard deviation by the square root of the number of trading days in a year.

Probability
Probability shows how likely an event is to occur. Although the result of one trial may be uncertain, patterns often appear when the same experiment is repeated many times. Probability theory helps measure uncertainty in many fields, from insurance risk to new drug tests in clinical trials.
Symmetric probability distributions
A symmetric distribution has the same shape on both sides of its center. Some symmetric distributions follow a bell shape, as test scores sometimes do.
Example: Roll two fair, six-sided dice many times and plot the sum of each roll. Over many trials, the results move toward a symmetric, triangular distribution centered on 7. Sums near the center occur more often than those at either end.

Fat tails, often tied to high kurtosis, mean that extreme gains or losses happen more often than a normal bell curve would suggest. Although it is widely used, the normal distribution can downplay the chance of extreme events, such as the 1987 stock market crash.

Skewed probability distributions
Skewed distributions show data that is spread unevenly, with a longer tail on one side. Common examples include personal income and losses from credit defaults.
Uneven distribution of income
Personal income is a well-studied example of a skewed distribution: most people earn in the lower or middle range, while a smaller group earns much more. Researchers study this pattern to understand the income gap, poverty, and economic growth.

A small risk of a substantial loss
Even bonds with a low chance of default carry some risk of losing part or all of the invested principal during the holding period.

The psychology of risk
A risk-taker focuses on the remote chance of winning the lottery. A risk-averse person worries about an equally unlikely danger, like someone striking them with lightning.
Both give weight to rare, extreme outcomes—the events found in the tails of a probability distribution.
Average vs. weighted average
The Dow Jones Industrial Average is a price-weighted index, meaning stocks with higher share prices have a greater effect on its value.
A simple average gives every observation the same weight. A weighted average gives some observations more weight, based on things such as duration, volume, or money value. Choose weights that fit the goal of the analysis; they do not have to follow a straight line.
Example: A simple average of stock prices gives equal importance to prices recorded during quiet and busy trading periods. Weighting prices by trading volume gives more weight to the prices at which more shares changed hands.

Volume-weighted average price
Buyers and sellers sometimes agree to trade at the average price weighted by trading volume over a set period. This is called a VWAP trade.
Moving average
A moving average smooths short-term swings in a data series, making the trend easier to see.
Example: A four-day moving average applied to a data series with many swings.

You can plot a moving average at the center or the end of the period used to calculate it.
Logarithmic scale
We do not always feel equal time gaps in the same way. The gap between one and two years from now may feel larger than the gap between 10 and 11 years. A logarithmic time axis can match this view by giving more space to shorter time spans and less to longer ones.
X-axis log scale
A logarithmic scale works across a wide range of values. Equal spacing shows equal ratios, not equal gaps.
When the focus is on the near term, a log scale on the time axis makes shorter spans easier to tell apart while keeping more distant periods visible.
Example: A yield curve showing Treasury bills, notes, and bonds across different maturities.

Y-axis log scale
A logarithmic y-axis shows proportional changes instead of absolute differences. Equal percent increases take up the same vertical space, no matter the starting value.
Example: A 10-point rise from 10 to 20 is a 100% gain, while a rise from 100 to 110 is 10%. From 1,000 to 1,010, the gain is just 1%. A logarithmic scale shows these differences with smaller and smaller vertical moves.

A logarithmic y-axis is especially useful for showing stock prices or market indexes over long periods.
Logarithmic scales can use different bases, but base 10 is a practical and easy-to-read choice for most charts.
log_{10}10 = 1 log_{10}50 = 1.7 log_{10}100 = 2 log_{10}500 = 2.7 log_{10}1000 = 3 log_{10}5000 = 3.7 log_{10}10000 = 4
Comparable scales
When you compare two or more data series, use scales that make the comparison clear. Readers see gentle slopes as smaller increases and steeper slopes as larger increases. The example below shows how matching the y-axis scales to equal percent changes makes the relative performance of two stocks easier to judge.
Example
Creating comparable scales step by step
Stock P trades between $21 and $24, while Stock Q trades between $105 and $110.
Both graphs now use comparable scales, making the two stocks’ relative performance easy to compare.
Percentage change
When a value falls below its original level, the change is shown as a percentage decrease.
Example: If a value drops from 100 to 90, that is a 10% decrease.

A change in value can be shown as a percentage of the original amount.

Changing the starting point of a data series changes the baseline used to calculate percent changes, which can produce different results.

Re-indexing to 100 or 0
Starting from a baseline of 0 or 100 makes changes easier to read. A rise from 100 to 113 clearly shows a 13% gain, while a rise from 123 to 139 takes more work to see as a similar increase.

Re-indexing to 100 rescales a data series so its first value equals 100.

Rebasing to 0 shows each value as a percentage change from the first data point. The following formula gives another way to calculate it.
![Table and line chart showing data rebased to 0 using [(current value ÷ initial value) × 100] − 100. Values 4, 6, 5, 5, and 7 become percentage changes of 0%, 50%, 25%, 25%, and 75%.](http://images.ctfassets.net/f7c5cf3am3tw/77sIco5bU2iuTgt4yYvTdB/c1c995a0c0ff83ff966166338f12b84e/img_26.webp)
Familiar round numbers, such as 1,000 or 10,000, can also work as useful baselines, depending on the context. For example, you can show a stock's performance as the changing value of an initial $10,000 investment.
Summary
Data visualization turns raw data into useful insight. By showing patterns in sales, market segments, and customer behavior, it helps teams refine forecasts, understand their audiences, and improve their plans.
Across finance, medical research, and business operations, clear visuals make complex information easier to read and share. Advances in artificial intelligence, virtual reality, and real-time dashboards are expanding how people explore data and use it to make smart choices.
The next article in the Data Visualization series covers percentages. Stay tuned, and subscribe to our mailing list to get the next article on data visualization.
If you missed the previous seven articles from the series, you can read them here:
Dworkz helps B2B SaaS teams design tables, dashboards, and workflows that make complex information easier to use. Need clearer data experiences in your product? Let’s talk
FAQ
When should I use the mean instead of the median?
Use the mean when every value in the data set should count equally and the data is not heavily skewed by very high or low values. Use the median when the data is unevenly spread or has outliers, such as household incomes or home prices, because the median is less affected by extreme values.
Why does standard deviation matter in finance?
Standard deviation helps show how much returns vary around their average. In finance, that spread is often read as volatility: a higher standard deviation means returns are more spread out, and the asset's price may be less predictable. For daily returns, annualized volatility is often estimated by multiplying the daily standard deviation by the square root of the number of trading days in a year.
What is the difference between a simple average and a weighted average?
A simple average gives every observation the same weight, while a weighted average gives more weight to some observations based on things such as trading volume, duration, or money value. For example, a volume-weighted average price gives more importance to prices at which more shares were traded, making it a better match for actual market activity than a simple average of recorded prices.
Why are logarithmic scales useful in charts?
Logarithmic scales are useful when values span a wide range or when proportional change matters more than absolute change. On a logarithmic y-axis, equal percent increases appear as equal vertical distances, which makes growth rates easier to compare over time. On a logarithmic x-axis, shorter time spans can be shown in more detail while longer spans stay visible.
How does re-indexing a data series to 100 help readers?
Re-indexing sets the first value of a series to 100, which makes later changes easier to read as percentage gains or losses from the starting point. For example, a move from 100 to 113 clearly shows a 13% increase. This is especially useful when you compare series that begin at different absolute values.


