Menu

GSM to Kilograms: Work Out Copier Paper Weight per Ream in Python
📰

GSM to Kilograms: Work Out Copier Paper Weight per Ream in Python

DEV Community: python·PackForge Industries·1 day ago
#rVr2Bw3z
#devtopython#devto#dev#ream#reams
Reading 0:00
15s threshold

Ordering paper for an office is easier when you know what a carton weighs before it arrives. The GSM printed on the ream (grams per square metre) is all you need to work it out.

The formula

weight of one sheet = GSM x sheet area (m²)

A4 is 210 x 297 mm, so one sheet is 0.21 x 0.297 = 0.06237 m². A3 is exactly twice that.

SIZES_M2 = { " A4 " : 0.210 * 0.297 , " A3 " : 0.297 * 0.420 }

def ream_kg ( gsm , size = " A4 " , sheets = 500 ): return gsm * SIZES_M2 [ size ] * sheets / 1000

for gsm in ( 70 , 75 , 80 ): print ( gsm , " GSM A4 ream: " , round ( ream_kg ( gsm ), 2 ), " kg " )

Enter fullscreen mode

Exit fullscreen mode

Output:

70 GSM A4 ream: 2.18 kg 75 GSM A4 ream: 2.34 kg 80 GSM A4 ream: 2.49 kg

Enter fullscreen mode

Exit fullscreen mode

An 80 GSM A3 ream comes to about 4.99 kg.

Cartons

Paper usually ships in cartons of 5 or 10 reams:

def carton_kg ( gsm , reams , size = " A4 " ): return ream_kg ( gsm , size ) * reams

print ( round ( carton_kg ( 80 , 5 ), 1 )) # 12.5 print ( round (…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.