CalcTree Help Pages
  • What is CalcTree?
  • Getting started
    • CalcTree Pages
    • Create a CalcTree Page
    • Add a calculation
    • Collaborate with a colleague
  • Calculations
    • Parameters
      • Math formulas
        • Parameter Data Types
        • Native Functions
          • Arithmetic Functions
          • Trigonometric Functions
          • Logical & Comparison Functions
          • Matrix & Vector Functions
          • Probability & Combinatorics Functions
          • Statistical Functions
          • String Functions
          • Utility Functions
          • Other Native Functions
        • Valid Expression Syntax
      • Supported Units
      • Dropdown List Parameters
        • Linking CSV Data to Dependent Dropdowns in CalcTree
      • Parameter Settings
    • Integrations
      • Python in CalcTree
        • Adding a Python Source
        • Defining Parameters in Python
        • Referencing Other Parameters in Python
        • Working with Units in Python
        • Creating Tables and Visuals in Python
        • Consuming Files in Python
        • Using Pre-installed Python Libraries
      • Spreadsheets [Coming Soon!]
      • File Upload
        • CSV files
      • 3rd Party Software Plugins
        • Excel
        • Grasshopper
        • ETABS [v20 & v21]
        • ETABS [v22]
        • SAP 2000
        • CSI Bridge [v26]
    • Templates [Coming Soon!]
    • Optimising your calculations
  • Pages & Reports
    • CalcTree Documents
    • Static content
    • Parametric content
      • Parametric equation
      • Inputs
      • Outputs
  • Export to PDF
  • API
    • GraphQL API
      • Generating an API key
      • Queries
        • GetCalculation
        • Calculate
      • Examples
        • Bulk calculations with Python
  • Collaborate
    • Add members
    • Review and approval
    • Add stakeholders
  • Administrate
    • CalcTree Workspace
    • Versioning and Audit trail
  • CalcTree for System Administrators
Powered by GitBook
On this page
  • Descriptive Statistics
  • Deviation & Spread
  • Correlation
  • Notes for CalcTree
  1. Calculations
  2. Parameters
  3. Math formulas
  4. Native Functions

Statistical Functions

PreviousProbability & Combinatorics FunctionsNextString Functions

Last updated 1 day ago

CalcTree supports a wide set of to help you analyze numerical datasets, arrays, or matrix values. These are useful in engineering QA, design checks, measurement summaries, and material variability analysis.

You can pass vectors directly (e.g. [10, 15, 20]) or link to values from table columns in your page.

Descriptive Statistics

Function
Description
CalcTree Example

mean(x)

Arithmetic average

mean([1, 2, 3]) → 2

median(x)

Median value

median([1, 5, 10]) → 5

mode(x)

Most frequent value(s)

mode([1, 2, 2, 3]) → [2]

min(x)

Minimum value

min([4, 2, 8]) → 2

max(x)

Maximum value

max([4, 2, 8]) → 8

sum(x)

Total sum

sum([1, 2, 3]) → 6

prod(x)

Product of all values

prod([2, 3, 4]) → 24

count(x)

Number of elements

count([10, 20, 30]) → 3

quantileSeq(x, p [, sorted])

p-th quantile(s)

quantileSeq([1, 2, 3, 4], 0.25) → 1.75

Deviation & Spread

Function
Description
CalcTree Example

std(x)

Standard deviation

std([2, 4, 4, 4, 5, 5, 7, 9])

variance(x)

Variance

variance([1, 2, 3]) → 0.666

mad(x)

Median Absolute Deviation

mad([1, 1, 2, 2, 4, 6, 9]) → 2

cumsum(x)

Cumulative sum

cumsum([1, 2, 3]) → [1, 3, 6]

Correlation

Function
Description
CalcTree Example

corr(a, b)

Correlation coefficient between two arrays

corr([1, 2, 3], [2, 4, 6]) → 1

Notes for CalcTree

  • You can pass arrays using:

    • Inline lists: [value1, value2, value3]

    • Column values from a table

  • Most functions return a unitless scalar, unless your input values carry units (e.g., sum([1 m, 2 m]) → 3 m)

  • If using multi-column data, apply functions separately per column or row using map() or extract with row(), column(), etc.

📘 Looking for more functions? CalcTree’s expression engine is powered by . For a full list of available functions, visit the . Most functions listed there are supported in CalcTree unless otherwise noted.

statistical functions from MathJS
MathJS
MathJS Function Reference