# Wolfram|Alpha as a knitting tool

For those unfamiliar with the site, Wolfram|Alpha is a “computational knowledge engine.”  At its core, it’s a solid calculator capable of complex functions, but it is also a database of facts and figures about about everything (it seems) the developers could think of, and can save you a lot of time and energy while knitting (or doing anything else that involves math).  I realize there are sites out there specifically for knitting calculations, but I personally prefer having everything I need in one place (especially when that one place is a browser toolbar).

Stitches can be substituted with rows in any of these examples (as long as you stay consistent within an equation), and inches with centimeters or any other units, I just stuck with these ones to keep things streamlined.  If you have any questions or aren’t sure how to do a calculation, feel free to post a comment and I will answer to the best of my ability.

# Functions

Just a quick overview of mathematical functions on the keyboard:

– (hyphen) – subtraction

* (asterisk) multiplication.  In certain cases this can be omitted, just use normal math rules (and use the asterisk if you’re not sure)

/ (forward slash) division.  Also used to denote fractions: 1/2 is one half

Parenthesis () are used to separate out sub-functions

^ (“carrot”) exponents, including squaring a number

, (comma) is used to separate two functions (or two values within a funtion) which you want to compare.

Wolfram accepts and solves for variables—I use “x” almost exclusively.  To solve for a variable, you must have a full equation with an equal sign (=).  Wolfram also accepts less that (<) and greater that (>) signs.

# Stitches-to-Inches and Analogy Equation

Stitches per inch:

The analogy equation (“A is to B as C is to D“) is very versatile and will get you through the majority of your knitting math, especially conversions.  At it’s core, the equation has to following form (be sure to be consistent in your units):

You can plug in a variable (x) into  any slot, fill in the others with the ones you know, and Wolfram will give you the value of your variable.

To determine the number of stitches it will take to reach a certain number of inches, or vice versa, use the following equation:

This basic formula can also be used to determine yardage based on the weight of a piece given the yardage and weight of a single ball or skein of your yarn, or countless other calculations with consistent units.

For text-based inputs, use the following form:

A is to B as C is to D

Use only numbers and a variable (no units), and as always be sure you are consistent in your unit placement.

#### Examples

If I cast on 45 stitches, knit a while, and measure that I have 12 inches, to calculate stitches per inch, I would plug in 45/12 and get 3.75.  If a pattern I’m looking at gives it’s gauge in stitches per 4 inches, I plug in 45/12=x/4 and get x=15.  You use this same formula to calculate how many stitches it will take to reach a given number of inches once you have your gauge.

To calculate how many inches a number of stitches will yield, we use basically the same formula as above, just with the variable moved.  Using my gauge above (15 stitches per 4 inches), if a pattern called for 115 stitches, I could plug in 15/4=115/x and see that x=92/3.  Not very useful in itself, but when I plug that fraction into Wolfram I see that those 115 stitches would yield about 30.67 inches.

Let’s say I’m knitting with a certain yarn, and I know a 50 gram ball of yarn is 125 yards.  My project weighs 80 grams, so I type in 110 is to 50 as x is to 80 and am given the result 176, the number of yards used in my project.  You could also weigh the remaining yarn in the ball and subtract that weight from the weight of the total number of balls you started with (especially useful when a single project uses several yarns).

# Calculating Several Measures at Once

You can perform the same operation on several measures at once using commas (separate them out within a set of parentheses), which is especially useful when scaling up or down an entire pattern.   The same method can be used with any other batch calculations.

Putting commas between unrelated equations or functions allows you to compare their results on a single page.

#### Example

Let’s say I am scaling a pattern with three parts: part 1 is 60 stitches, part 2 is 20 stitches, and part 3 is 100 stitches.  Using the stitches-to-inches formula above, I conclude that to get the size I want, I need to knit 42% more stitches in each part (that is, to multiply each stitch count by 1.42).  I plug in 1.42(60, 20, 100) and it outputs {85.2, 28.4, 142.}.  With rounding, this gives you your new stitches.

# Converting US Standard to Metric and Vice Versa

If you just plug in a number and a unit of measurement, Wolfram converts it into several different measurement systems.  You can also type in a specific conversion, such as 70 cm in inches.

# Finding or Converting Needle Sizes

Type in US 4 knitting needle or 5.5 mm knitting needle and get those sizes in other systems.

# Random Facts and Figures

Wolfram contains information about a lot of really random stuff (such as color information and certain human body dimensions), and it’s fun to play with queries just to see what you find.  You can also check out their examples page for a list of types of data they have.