agentsclimarketplace

Excel financial calculations

Skill cxcscmu/SkillLearnBench/skills/b4-skill-creator-claude-haiku-4-5/weighted-gdp-calculation/excel-financial-calculations

[COLM'26] SkillLearnBench is the first benchmark for evaluating continual learning methods that automatically generate agent skills.

Install
npx -y skills add cxcscmu/SkillLearnBench --skill excel-financial-calculations

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

What its author says it does

Copied from the file, not written here

Calculate financial metrics in Excel including percentages of GDP, percentage changes, and weighted averages. Use this skill when working with economic data, calculating net exports as percentage of GDP, or deriving financial ratios from raw data.

SKILL.md

3.6 KB, as published. Nobody here has run it

Excel Financial Calculations

Overview

Common financial calculations in spreadsheets require understanding how to properly handle percentages, ratios, and weighted aggregations.

Net Exports as Percentage of GDP

Formula structure:

=( Net Exports / GDP ) * 100

This gives you the percentage in the typical display format (e.g., 5.2 rather than 0.052).

Example:

=( H35 / G35 ) * 100

Where:

  • H35 = Net Exports value
  • G35 = GDP value
  • Result displays as percentage (e.g., 5.2)

Key point: Multiply by 100 to display as percentage rather than decimal.

Percentage of Total

Similar structure:

=( Component / Total ) * 100

Weighted Average (SUMPRODUCT)

Use SUMPRODUCT for weighted averages where each value has an associated weight.

Formula:

=SUMPRODUCT(values, weights) / SUM(weights)

Or if you want the result as a percentage (multiplied by 100):

=(SUMPRODUCT(values, weights) / SUM(weights)) * 100

Example - Weighted mean of net exports as % of GDP:

=SUMPRODUCT(C35:C40, B35:B40) / SUM(B35:B40) * 100

Where:

  • C35:C40 = net exports as % of GDP for each country
  • B35:B40 = weight for each country (typically population, GDP, or another measure of size)
  • Result = weighted average percentage

Breaking it down:

  1. SUMPRODUCT(C35:C40, B35:B40) = sum of (each % × its weight)
  2. SUM(B35:B40) = total of all weights
  3. Divide to get weighted average
  4. Multiply by 100 if displaying as percentage

Percentage Rounding

To round percentages to one decimal place:

=ROUND( calculation, 1)

Combined with your calculation:

=ROUND( (value / total) * 100, 1)

Or:

=ROUND( SUMPRODUCT(values, weights) / SUM(weights) * 100, 1)

Statistical Functions with Percentages

When calculating statistics on percentage data:

=MIN(range) * 100        or =ROUND(MIN(range) * 100, 1)
=MAX(range) * 100        or =ROUND(MAX(range) * 100, 1)
=MEDIAN(range) * 100     or =ROUND(MEDIAN(range) * 100, 1)
=AVERAGE(range) * 100    or =ROUND(AVERAGE(range) * 100, 1)
=QUARTILE(range, 1) * 100  for 25th percentile
=QUARTILE(range, 3) * 100  for 75th percentile

Or with PERCENTILE function:

=PERCENTILE(range, 0.25) * 100   for 25th percentile
=PERCENTILE(range, 0.75) * 100   for 75th percentile

Order of Operations

When combining calculations:

  1. Do the lookup/retrieval
  2. Calculate the percentage (divide then multiply by 100)
  3. Apply rounding
  4. For aggregations, apply weights before averaging

Pattern:

=ROUND( (raw_value / denominator) * 100, 1)

Common Pitfalls

  1. Forgetting × 100 - Results display as 0.05 instead of 5
  2. Dividing by zero - Use IF to check: =IF(denominator=0, 0, numerator/denominator*100)
  3. Wrong order - Round after all calculations, not before
  4. Mixing decimal and percentage forms - Be consistent in your data
  5. SUMPRODUCT with wrong ranges - Ensure weights and values arrays have same dimensions

Example Complete Flow

For net exports as % of GDP by country with weighted mean:

Cell H35: =ROUND( (H32 / H31) * 100, 1)    [first country, net exports % of GDP]
Cell H36: =ROUND( (H33 / H32) * 100, 1)    [second country...]
...
Cell H41: =ROUND( SUMPRODUCT(H35:H40, E35:E40) / SUM(E35:E40) * 100, 1)  [weighted mean]

Where E35:E40 contains the weights (e.g., GDP, population, etc.)

Keep looking

Skills are one crate of 328,083. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.