Sign Up for Free

RunKit +

Try any Node.js package right in your browser

This is a playground to test code. It runs a full Node.js environment and already has all of npm’s 1,000,000+ packages pre-installed, including standarddeviation with all npm packages installed. Try it out:

var standarddeviation = require("standarddeviation")

This service is provided by RunKit and is not affiliated with npm, Inc or the package authors.

standarddeviation v0.0.2

A tiny node module to calculate Standard Deviation from a given array dataset

STDEV - Standard Deviation

A tiny library for calculating Standard Deviation. Inputs a dataset array, retrieves the calculated standard deviation as float.


NPM: npm install standarddeviation --save

Yarn: yarn add standarddeviation


Require the module in your node project: const stdev = require('standarddeviation')

Make sure you have a dataset that is an array: const exampleSet = [0, 1, 2, 3, 4, 5, 6]

Execute Standard Deviation calculation: const deviation = stdev.calculateStandardDeviation(exampleSet)

Log the result console.log(deviation)

Check your console for the result: $ 2.160246899469287


Run mocha/chai: npm test


Please help me in making this module even better. File an issue if something doesn't work. Thanks!


  • supernoir

Release History

  • 0.0.1 Initial release
  • 0.0.2 Renames Module to StandardDeviation
RunKit is a free, in-browser JavaScript dev environment for prototyping Node.js code, with every npm package installed. Sign up to share your code.
Sign Up for Free