Average Calculator

Average Calculator

Average Calculator

We ignore empty items & text. Supports commas, spaces, and new lines.

How the Average Calculator Works

An Average Calculator is a tool that helps you find different types of averages quickly and without mistakes. Calculating an average by hand isn’t too hard, but when you have many numbers, different weights, or stock trades with multiple buy prices, it can get confusing. This calculator solves that problem instantly.

The calculator we built has three main modes:

  1. Simple Average (Arithmetic Mean)
  2. Weighted Average (when values have different importance)
  3. Trade or Running Average (used in stock/crypto trading)

Let’s look at each one step by step.

1. Simple Average

What it is

The simple average, also called the arithmetic mean, is the most common type of average. You add up all the numbers and divide by how many numbers there are.

How it works in the calculator

In the Simple Average tab, you can enter several numbers separated by commas, spaces, or new lines. The calculator cleans the data, ignores empty entries, and keeps only valid numbers.

It then shows you:

  • Count of numbers
  • Sum of all numbers
  • Mean (average)
  • Median (middle value when sorted)
  • Mode (most frequent value)
  • Range (maximum minus minimum)
  • Minimum and maximum
  • Standard deviation (how spread out the numbers are)
  • Sorted list of all values

Example

Suppose your test scores are:

12, 15, 18, 20, 35, 42, 42

  • Sum = 184
  • Count = 7
  • Mean = 184 ÷ 7 = 26.28
  • Median = 20 (middle value)
  • Mode = 42 (appears twice)
  • Min = 12, Max = 42, Range = 30
  • Standard deviation ≈ 10.42

The calculator shows all this instantly.

2. Weighted Average

What it is

Sometimes values don’t all have the same importance. For example, in school a final exam might count for 50% of the grade, assignments 30%, and homework 20%. You cannot just do a simple average — you need a weighted average.

Formula:

Weighted Average = (value1 × weight1 + value2 × weight2 + …) ÷ (sum of weights)

How it works in the calculator

In the Weighted Average tab, you get a table. Each row has:

  • Value (e.g., a test score)
  • Weight (how much it counts)

The calculator multiplies each value by its weight, adds them all up, and divides by the total weight.

Example

Suppose in one course you have:

  • Final exam = 90 points, weight = 2
  • Midterm = 80 points, weight = 1
  • Project = 70 points, weight = 1

Calculation:

(90×2 + 80×1 + 70×1) ÷ (2+1+1)

= (180 + 80 + 70) ÷ 4

= 330 ÷ 4

= 82.5

Your weighted average = 82.5

3. Trade or Running Average

What it is

This is used a lot in stock trading or investing. If you buy the same stock multiple times at different prices, your “average price” is important because it tells you your cost basis.

Formula:

Average Price = (sum of (quantity × price)) ÷ (sum of quantities)

How it works in the calculator

In the Trade Average tab, you enter each trade as a row:

  • Quantity (how many units you bought)
  • Price (what you paid per unit)

The calculator multiplies quantity × price for each trade to get the trade value, adds them all up, and divides by the total quantity.

Example

Suppose you buy shares like this:

  • 10 shares at $100 → value = $1000
  • 5 shares at $120 → value = $600
  • 8 shares at $95 → value = $760

Totals:

  • Quantity = 10+5+8 = 23
  • Value = 1000+600+760 = 2360
  • Average price = 2360 ÷ 23 = 102.61

So your average cost = $102.61 per share.

4. Extra Features

Besides the main calculations, the calculator includes:

  • Demo button → fills with example data so you can see how it works.
  • Clear button → resets everything.
  • Hidden results → outputs only appear after calculation, to keep it clean.
  • Modern design → background color #f2f2fa (light), button color #371f91 (strong purple).