# Calculating Hard Disk Size

• 10-30-2007
n0namebrand
Calculating Hard Disk Size
I have a Seagate 320GB SATA-300 internal hard drive, model TSD-320AS. The logical geometry of the hard drive is 16,383 cylinders, 16 heads and 63 sectors per track.

To my knowledge,

Capacity = Number of cylinders × number of heads × sectors/track × 512 = hard disk size (bytes)

For my specific hard disk my calculations are:

16,383 * 16 * 63 * 512 = 8455200768 bytes (not close to being right)

Does anybody know where I'm going wrong here? :confused:
• 10-30-2007
oz
Welcome to the forums! :)

Here's a media size calculator you can use if that helps:

Media Size Calculator
• 10-30-2007
n0namebrand
Thanks for the welcome and the media calculator!

I noticed this on the media calculator page:

WD Caviar AC28400 Drive H=16, C=16383, S=63, B=512, Size=8.4GB

The 8.4GB WD Caviar has the exact same cylinders, as my 320GB Seagate. I guess my cylinder values are wrong...

MaxtorDiamondMax D540 Drive H=16, C=317632, S=63, B=512, Size=160GB

The 160GB Maxtor is exactly half of my 320GB Seagate. The 160GB Maxtor's cylinders are 317632.

317632 * 2 should give me my Seagate's cylinders, correct?
• 10-30-2007
oz
I looked up the specs on your drive and it appears that you are correct about them in your first post.
• 10-30-2007
n0namebrand
Thanks ozar, I've been searching google too for my drive's specs and all I find is 16,383 cylinders. That would make my 320GB capacity ~8.4GB...according to these calculations 16,383 * 16 * 63 * 512 = 8 455 200 768 bytes. I'm really scratching my head here.
• 10-13-2015
Raptio
Same Problem
Same problem for me also..

same values for head,sectors and cylinders

but actual capacity of my hard disk is 1tb
• 10-13-2015
Segfault
The unit is TB, not tb. Metric system is case sensitive. See here. Also binary unit is TiB.
Anyhow, the sector size is probably incorrect. New drives come with 4096 sector size, while they tend to lie the size is 512, I think it is for compatibility reasons. See an example output below.

Code:

```Disk /dev/sde: 1.8 TiB, 2000398934016 bytes, 3907029168 sectors Units: sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 4096 bytes I/O size (minimum/optimal): 4096 bytes / 4096 bytes Disklabel type: gpt Disk identifier: E8BFDCAD-42B4-B34F-BA99-19CC02F4A253```