Roll length calculator


Introduction

Knowing the length of a roll just by measuring its diameter can be useful in many situations, since many everyday objects are in rolled form, like tapes, paper, plastic films, and so on.

Common spiral products

There are two ways of calculating the length of roll (mathematically speaking a "spiral"), an exact and complex formula derived from integral calculation and an approximate and simpler formula derived from the sum of circumferences of concentric circles. The approximate formula is enough in many situations as long as the thickness of the tape is small compared to the diameter of the roll.


The calculator

The following calculator will simplify the math and will do the calculations for you (with the exact or the simplified formula):

Tape thickness: h =  mm
Roll internal diameter: D0 =  mm
Roll external diameter: D1 =  mm
Tape length: L =  m
Number of turns: N = 
Use exact formula

Mobile version available here.


Derivation of the approximate formula

Now let's have a look on how these formulas are deduced. To keep things simple, let's consider the spiral as a series of concentric circles (one per turn) where the radius increases by the thickness of the tape every turn. The error will be small if the thickness is small compared to the minor diameter of the roll.

Definition of D0, D1 and h

Let D0 be the inner diameter of the roll (the diameter of the core), D1 the outer diameter of the roll, h the thickness of the tape and N the number of turns. We look for the length of the tape L.

First, the number of turns is easy to compute, since it's just the difference of the two radii divided by the thickness of the tape or, in terms of diameter:

N=(D_1-D_0)/(2*h)

The circumference of the first turn is πD0, the one of the second turn π(D0+2h), the one of the third one π(D0+4h), and so on until the Nth turn, which has a circumference of π(D0+2(N–1)h). The total length of the tape is therefore:

L=pi*D_0+pi*(D_0+2*h)+pi*(D_0+4*h)+...+pi*(D_0+2*(N-1)*h)

By rearranging the terms we get:

L=pi*(D_0+D_0+2*h+D_0+4*h+...+D_0+2*(N-1)*h)

L=pi*(N*D_0+2*h*(1+2+...+(N-1)))

Now, the sum of the integers from 1 to N-1 can be expressed in the form N(N–1)/2 (Gauss's formula). The length L can therefore be expressed as:

L=pi*(N*D_0+h*N*(N-1))

Or, in a simpler form:

L=pi*N*(D_0+h*(N-1))


Inverting the approximate formula

Now, if we want to do the reverse operation, meaning to calculate D1 as a function of L, we just need to invert this equation (2nd degree in N) and we get:

N=(h-D_0+sqrt((D_0-h)^2+4*h*L/pi))/(2*h)

Second degree equations usually have two solution, expressed with a "±" sign; but in this case we just want the solution with "+", as the solution with "–" corresponds to the same spiral, but coiled in the other direction.

Than we calculate D1 with:

D_1=2*N*h+D_0


Derivation of the exact formula

To calculate the exact length of the spiral, we write the equation of the curve in polar coordinates:

rho=h*phi/(2*pi)

Here ρ is the distance between the axis as a function of the angle φ. φ is expressed in radians and is 0 at the beginning and increases by every turn. So, every turn the radius ρ increases by h.

Definition of rho and phi

To calculate φ we proceed as we did before to calculate N, but now we have a factor because of the angle in radians:

phi_0=pi*D_0/h and phi_1=pi*D_1/h

The length of a curve in polar coordinates is calculated with the following formula:

L=int((rho^2+(drho/dphi)^2)dphi)

Here, the derivative is easy to calculate and we get:

drho/dphi=h/(2*pi)

So, to find the exact length, one just has to calculate:

L=(h/(2*pi))*int((phi^2+1)dphi)

Now, the things are more complicated. Even if a good integral solving list should include the solution of such integral, if we want to calculate it by hand, we'll have first to change the variable using the hyperbolic identity ch2x – sh2x = 1 and than transform the result with another hyperbolic identity: ch(2x) = ch2x + sh2x. After a full page of algebra we get the exact length:

L=h/(2*pi)*((phi_1/2)sqrt(phi_1^2+1)+(1/2)*ln(....


Inverting the exact formula

Inverting this function is not easy, and in this application a numerical approximation (the Newton's method) is used. This method start with an approximation or a guess of the solution (zero of a function) and iteratively refines it by finding the intercept point on the abscise axis of its tangent line. Since this point is a better approximation, so the process can be repeated until the desired precision is achieved.

Here we have L(φ01)=L0 and we want to find φ1 knowing L0 which is the given length of the spiral; φ0 is constant. We can rewrite this equation in the form L(φ01) – L0 = 0 and we call it f(φ01) as follows:

f(phi0,phi1)=L(phi0,phi1)-L0=0

The Newton's method tells us that a better approximation of φ1 is φ'1 which is:

phiprime=phi-f(phi0,phi1)/(df(phi0,phi1)/dphi1)

And we can iterate the above equation until the desired precision is achieved. The calculator in this page tries to reach as much precision as it can be stored in a regular JavaScript floating point variable, so that no error can be remarked. Usually a few iterations are enough. To start this algorithm, we can use the approximate formula to find an initial φ1.

In order to implement this method, we need to compute by hand the derivative ∂f(φ01)/∂φ1, which is just ∂L(φ01)/∂φ1 since L0 is constant. We find:

dL/dphi1=h/(2*pi)*((2*phi_1^2+1)....

With this the inversion algorithm can be easily implemented in the calculator.


Evaluation of the error of the approximate formula

To have an idea of the error introduced by the approximate formula, let's take an example: suppose we have a roll of paper with an inner diameter D0 = 100 mm, an outer diameter D1 = 200 mm and a thickness h = 100 μm. With the approximate formula we get N = 500 and Lapprox = 235.4623694 m. With the exact formula we get φ0 = 1000π, φ1 = 2000π and Lexact = 235.6194545 m. The difference is only 157 mm over 235 m, an error of 0.067 %. If we consider that when we measure the diameter the precision is probably about 1 mm over 1 m (0.1 %) the error of the approximate formula is small.

The advantage of the approximate formula is that it uses only basic operations and can be easily computed even by hand on a simple pocket calculator. The exact formula uses a lot more math, needs at least a good scientific calculator, is long to do by hand and has little gain on precision. On the other hand, on a computer or a smart-phone, there is enough CPU power for this JavaScript calculator to consider the exact formula as a better option.