Average

Basic usage

const avg = $derived(table.createCalculation('price').avg())
<h1>Average: {avg}</h1>
  • GMC - Yukon (1999) 🪙 73,958
  • Honda - Odyssey (2007) 🪙 70,078
  • Ford - Club Wagon (1992) 🪙 51,053
  • Mazda - RX-8 (2008) 🪙 13,806
  • Volvo - XC90 (2003) 🪙 38,348
  • Suzuki - SJ 410 (1986) 🪙 56,409
  • Chevrolet - 1500 (1996) 🪙 7,567
  • Porsche - Cayenne (2013) 🪙 71,978
  • Acura - Legend (1989) 🪙 37,335
  • Oldsmobile - Bravada (1998) 🪙 53,546
  • Subaru - Impreza (2012) 🪙 70,626
  • Mitsubishi - Mirage (2002) 🪙 50,873
  • Mitsubishi - Montero (1996) 🪙 34,698
  • Mitsubishi - Pajero (1993) 🪙 7,697
  • Toyota - Corolla (N/A) 🪙 5,666
  • Volvo - XC90 (2005) 🪙 64,304
  • Buick - LeSabre (1991) 🪙 57,694
  • Ford - Taurus (2002) 🪙 73,038
  • Mitsubishi - Galant (1986) 🪙 43,387
  • Chevrolet - G-Series 3500 (1998) 🪙 6,199
  • Mercury - Milan (2007) 🪙 65,620
  • Mercedes-Benz - M-Class (2006) 🪙 26,362
  • Chevrolet - Caprice (1991) 🪙 70,704
  • Ford - Ranger (1998) 🪙 63,592
  • Kia - Amanti (2004) 🪙 37,856
  • Mazda - MX-3 (1996) 🪙 45,637
  • Buick - Coachbuilder (1991) 🪙 28,274
  • Porsche - 911 (2003) 🪙 49,202
  • Chevrolet - Astro (1993) 🪙 23,455
  • Lexus - GS (2007) 🪙 46,032
  • Nissan - Sentra (1994) 🪙 36,556
  • Chevrolet - Malibu (1997) 🪙 20,142
  • Acura - Integra (1999) 🪙 31,700
  • Aston Martin - DB9 (2010) 🪙 41,264
  • Ford - F-Series Super Duty (2008) 🪙 64,838
  • Maybach - 62 (2009) 🪙 54,935
  • Saab - 9-7X (2007) 🪙 51,320
  • Chevrolet - Suburban (2010) 🪙 30,335
  • BMW - 745 (N/A) 🪙 51,731
  • Buick - LeSabre (1992) 🪙 27,951
  • Audi - A8 (2005) 🪙 67,710
  • Audi - S8 (2003) 🪙 74,794
  • Lotus - Esprit (1989) 🪙 74,121
  • Cadillac - Escalade (2006) 🪙 35,283
  • Subaru - Impreza (2002) 🪙 13,315
  • Ford - F150 (2012) 🪙 73,314
  • Cadillac - Eldorado (2000) 🪙 66,447
  • Jeep - Liberty (2005) 🪙 29,539
  • Saab - 9-3 (2008) 🪙 32,020
  • Cadillac - XLR (2004) 🪙 21,947
  • Mitsubishi - Galant (1996) 🪙 69,176
  • Scion - xB (2011) 🪙 51,814
  • Volvo - V70 (2000) 🪙 75,276
  • Mazda - RX-7 (1984) 🪙 53,929
  • Bentley - Azure (N/A) 🪙 29,674
  • Hyundai - Elantra (1996) 🪙 2,691

Avanced usage

// calc area from 'width' and 'length' row props and conversion to yd²
const calc = table.createCalculation(({ width, length }) => width * length * 1.196)

const avg = $derived(calc.avg({ precision: 3 }))
<h1>Average area: {$avg} yd²</h1>
  • 53 Mariners Cove Place ↔ 35.258m
    ↕ 97.617m
  • 811 Tennessee Parkway ↔ 14.634m
    ↕ 53.736m
  • 0980 Schmedeman Court ↔ 12.787m
    ↕ 20.361m
  • 927 Becker Parkway ↔ 74.844m
    ↕ 56.882m
  • 4409 Gina Parkway ↔ 14.896m
    ↕ 75.769m
  • 9547 Northland Lane ↔ 82.735m
    ↕ 30.321m
  • 8 Drewry Terrace ↔ 81.082m
    ↕ 83.739m
  • 63 Merchant Street ↔ 67.309m
    ↕ 73.555m
  • 94637 Boyd Lane ↔ 98.116m
    ↕ 35.037m
  • 09 Basil Plaza ↔ 80.235m
    ↕ 22.433m
  • 476 Lien Court ↔ 81.901m
    ↕ 51.66m
  • 7 Mcguire Alley ↔ 67.02m
    ↕ 82.925m
  • 05 Banding Court ↔ 41.216m
    ↕ 81.931m
  • 3 Cottonwood Street ↔ 58.893m
    ↕ 70.325m
  • 6 Mallard Lane ↔ 70.531m
    ↕ 40.614m
  • 564 Bartelt Plaza ↔ 75.773m
    ↕ 64.168m
  • 4402 Almo Park ↔ 58.397m
    ↕ 91.368m
  • 72 Sloan Point ↔ 91.94m
    ↕ 61.362m
  • 57 Hayes Street ↔ 90.838m
    ↕ 87.575m
  • 34 Dayton Hill ↔ 71.643m
    ↕ 33.294m
  • 422 Dunning Avenue ↔ 71.942m
    ↕ 39.864m
  • 149 3rd Terrace ↔ 82.733m
    ↕ 17.876m
  • 501 Cherokee Crossing ↔ 54.799m
    ↕ 55.125m
  • 0 Green Ridge Point ↔ 97.377m
    ↕ 58.678m
  • 92 Hovde Center ↔ 76.029m
    ↕ 25.81m
  • 0435 Nevada Avenue ↔ 44.193m
    ↕ 90.937m
  • 0 Manley Road ↔ 42.45m
    ↕ 24.977m
  • 64 Service Circle ↔ 66.519m
    ↕ 12.644m
  • 2 Cordelia Point ↔ 47.431m
    ↕ 84.918m
  • 7711 Cody Parkway ↔ 11.315m
    ↕ 84.097m
  • 88988 Fair Oaks Point ↔ 95.393m
    ↕ 58.08m
  • 87 Schmedeman Place ↔ 79.288m
    ↕ 54.087m
  • 6 Fairfield Place ↔ 29.72m
    ↕ 32.508m
  • 80 Springview Point ↔ 90.561m
    ↕ 61.417m
  • 76945 Dixon Court ↔ 98.176m
    ↕ 39.474m
  • 18204 Little Fleur Circle ↔ 64.097m
    ↕ 26.934m
  • 0 Golden Leaf Way ↔ 44.514m
    ↕ 32.581m
  • 012 Hazelcrest Alley ↔ 62.798m
    ↕ 36.365m
  • 6 Independence Parkway ↔ 41.38m
    ↕ 95.573m
  • 73549 Troy Pass ↔ 50.325m
    ↕ 31.043m
  • 31438 Shoshone Drive ↔ 71.819m
    ↕ 71.96m
  • 8 Oneill Circle ↔ 62.753m
    ↕ 99.179m
  • 0896 Norway Maple Avenue ↔ 63.554m
    ↕ 39.725m
  • 793 Anderson Avenue ↔ 19.083m
    ↕ 75.859m
  • 50 Claremont Hill ↔ 94.505m
    ↕ 33.978m
  • 9 Fairfield Center ↔ 67.391m
    ↕ 24.623m
  • 15 Harbort Parkway ↔ 55.223m
    ↕ 54.434m
  • 80644 Orin Trail ↔ 93.692m
    ↕ 26.559m
  • 0390 Express Drive ↔ 85.953m
    ↕ 61.522m
  • 93758 Pierstorff Parkway ↔ 86.91m
    ↕ 13.286m