How the maths is done

Every rule each calculator follows, with an example, so you can check our answers against your own.

Updated · About avgcalc

Reading your numbers

A list can be separated by spaces, new lines, commas, semicolons, tabs or the | character. Because a comma is a separator, "1,000" is read as two numbers, 1 and 1000. Symbols stuck to a number are stripped ($90, 45%, 12kg all read as the number), and anything that still is not a number is skipped and reported above the results. The Unicode minus sign and the en dash are both read as a minus sign. Where a box expects one number (a GPA credit, a tip percent), a box holding two numbers is treated as empty.

Average, median, mode, range

The average is the arithmetic mean: sum divided by count. The median is the middle value of the sorted list, or the mean of the two middle values when the count is even. The mode is the value that appears most often; two or more values tied for the top count are all reported, and if every value appears once there is no mode. The range is the largest value minus the smallest. For 1, 2, 2, 9 that gives mean 3.5, median 2, mode 2, range 8.

Standard deviation and variance

The average calculator shows the sample standard deviation: the squared differences from the mean are summed and divided by n minus 1, then square-rooted. A single number therefore has no standard deviation. The mean calculator offers both sample (n minus 1) and population (n) versions and labels which is which. For 2, 4, 4, 4, 5, 5, 7, 9 the population standard deviation is 2 and the sample standard deviation is about 2.138.

Weighted average

Each value is multiplied by its weight, the products are summed and divided by the sum of the weights. Weights do not need to add up to 100 or 1. Blank rows are ignored, a row whose weight is zero does not count as used, and if every weight is zero there is no result. Negative weights are allowed because they are valid maths, even if unusual.

Grades and GPA

The grade average calculator weights each score by the percent of the course it is worth and reports the current grade out of the weight entered so far. Letter grades use the common US scale: A 90 and above, B 80 to 89, C 70 to 79, D 60 to 69, F below 60. The final grade calculator solves for the final exam score that reaches a target, given the current grade and the weight of the final. The GPA calculator uses A+ and A 4.0, A- 3.7, B+ 3.3, B 3.0, B- 2.7, C+ 2.3, C 2.0, C- 1.7, D+ 1.3, D 1.0, D- 0.7, F 0, multiplied by credits; honors adds 0.5 and AP adds 1.0 per course, capped at 5.0 on the 4.0 scale and 5.3 on the 4.3 scale. Cumulative GPA combines this term with the previous GPA and credits you enter.

Percentages

X% of Y is Y times X divided by 100. "What percent is A of B" is A divided by B times 100. Percent change from A to B divides the change by the absolute value of A. Percentage difference divides the gap between two numbers by the average of their absolute values, so it is symmetrical. Percent error divides the gap between measured and accepted by the absolute value of the accepted value. All are shown as percentages, not fractions.

Tips, ratios, proportions, GCF and LCM

Tip is bill times percent divided by 100, split evenly between people; tax is only included if it is already in the bill you type. Ratios are simplified by dividing both sides by their greatest common factor; decimal ratios are scaled to whole numbers first. A proportion a/b = c/d is solved by cross-multiplication for whichever term is blank. GCF uses Euclid's algorithm and LCM is a times b divided by their GCF, extended across every number entered; prime factorisations are shown.

Days, dates and business days

"N days from today" counts today as day 0, so 1 day from Monday is Tuesday. "Days until" a date does not count today unless you switch on "count the end date", which adds one. Business days skip Saturdays and Sundays only; public holidays are not skipped because they differ by country and employer. Real calendar dates are used, so 29 February exists in leap years, and a preset like "days until Christmas" rolls to next year's date once this year's has passed. Date calculations use your device's local date; the line crawlers see is computed in UTC at our edge and is replaced by your local version as soon as the page loads.

Hours and time durations

"N hours ago" and "N hours from now" add or subtract exactly N times 60 minutes from your device's clock, so across a daylight-saving change the clock time can differ from a plain N-hour shift. Time durations between two clock times that cross midnight are treated as overnight. Decimal hours are minutes divided by 60, so 90 minutes is 1.5 hours.

Time unit conversions

Seconds, minutes, hours, days and weeks convert exactly. A month is taken as 30.44 days (365.25 divided by 12) and a year as 365.25 days, the four-year leap-year average. Those two are approximations; the calendar's long-run average is 365.2425 days, about 11 minutes a year less.

Molecular weight

Formulas are parsed with nested brackets and hydrate dots (CuSO4·5H2O). Atomic weights are the abridged IUPAC values, typically four or five significant figures, so results are accurate to about that precision. Isotopes are not supported.

Rounding and display

"Auto" decimals shows at most four decimal places and drops trailing zeros; very small numbers are shown with four significant figures instead so they do not round to zero. Choosing a fixed number of decimals pads to that length. The Copy button copies the plain number with no thousands separators so it pastes cleanly into a spreadsheet. If a result overflows the largest number JavaScript can hold, the page says the values are too large to average accurately instead of showing a blank.

Found a mismatch?

Email hello@avgcalc.com with the page, your inputs and the answer you expected. The calculation code is covered by automated tests, and a wrong answer gets a test added so it stays fixed.