# Average file time

**URL:** https://community.mp3tag.de/t/average-file-time/19158
**Category:** Support
**Created:** [July 17, 2017, 9:10pm UTC](https://community.mp3tag.de/t/average-file-time/19158 "2017-07-17T21:10:20Z")
**Posts on this page:** 8
**Page:** 1

<div class="post-metadata">

### Author: ![Zerow](https://community.mp3tag.de/user_avatar/community.mp3tag.de/zerow/32/11379_2.png) [@Zerow](https://community.mp3tag.de/u/Zerow)
#### Post date: [July 17, 2017, 9:10pm UTC](https://community.mp3tag.de/t/average-file-time/19158/1 "2017-07-17T21:10:20Z")

</div>

Does anyone know how to count the average time of files?

I guess all what would had to be done would be adding numbers from the LENGTH tag field and then dividing by the overall number of files. But time is not counted in a decimal system, as files are

---

<div class="post-metadata">

### Author: ![stevehero](https://community.mp3tag.de/user_avatar/community.mp3tag.de/stevehero/32/337_2.png) [@stevehero](https://community.mp3tag.de/u/stevehero)
#### Post date: [July 17, 2017, 9:36pm UTC](https://community.mp3tag.de/t/average-file-time/19158/2 "2017-07-17T21:36:48Z")

</div>

Lower right hand coner of UI. Has file count, time and size.

Best you can do is divide the total time of selected by selected file count.

---

<div class="post-metadata">

### Author: ![ohrenkino](https://community.mp3tag.de/user_avatar/community.mp3tag.de/ohrenkino/32/4843_2.png) [@ohrenkino](https://community.mp3tag.de/u/ohrenkino)
#### Post date: [July 18, 2017, 5:28am UTC](https://community.mp3tag.de/t/average-file-time/19158/3 "2017-07-18T05:28:15Z")

</div>

> [@Zerow](#):
>
> Does anyone know how to count the average time of files?
> 
> I guess all what would had to be done would be adding numbers from the LENGTH tag field and then dividing by the overall number of files. But time is not counted in a decimal system, as files are

Start with the lowest unit and use $mod(xxx,60) to find the remainder.  
Use $div(xxx,60) to find the integer of the division and add it to the next unit.  
Go on like that until you have calculated all sub-values.

Did you know: most people drown in rivers that have an average depth of 1.5 meters.

---

<div class="post-metadata">

### Author: ![DetlevD](https://community.mp3tag.de/user_avatar/community.mp3tag.de/detlevd/32/123_2.png) [@DetlevD](https://community.mp3tag.de/u/DetlevD)
#### Post date: [July 18, 2017, 7:20am UTC](https://community.mp3tag.de/t/average-file-time/19158/4 "2017-07-18T07:20:48Z")

</div>

> [@Zerow](#):
>
> Does anyone know how to count the average time of files? ...

Maybe have look at ...  
[XML Export by Kage](https://community.mp3tag.de/t/5619/1)

In general you can add %\_length\_seconds% per file and divide the sum by %\_total\_files%.

Try this export file (one line):  
$filename($getEnv('USERPROFILE')'\Desktop\Export.Time.Files.Avg.txt',UTF-8)'Total Time [s]: '%\_total\_time\_raw%', Total files: '%\_total\_files%', Average Duration [s]: '$div(%\_total\_time\_raw%,%\_total\_files%)

Output examples:  
Total Time [s]: 28, Total files: 4, Average Duration [s]: 7  
Total Time [s]: 344, Total files: 4, Average Duration [s]: 86  
Total Time [s]: 330, Total files: 2, Average Duration [s]: 165  
Total Time [s]: 507, Total files: 3, Average Duration [s]: 169  
Total Time [s]: 146, Total files: 29, Average Duration [s]: 5

What do these values tell us?

DD.20170718.1120.CEST, DD.20170719.1846.CEST

---

<div class="post-metadata">

### Author: ![poster](https://community.mp3tag.de/user_avatar/community.mp3tag.de/poster/32/4881_2.png) [@poster](https://community.mp3tag.de/u/poster)
#### Post date: [July 18, 2017, 9:49am UTC](https://community.mp3tag.de/t/average-file-time/19158/5 "2017-07-18T09:49:06Z")

</div>

> [@stevehero](#):
>
> Lower right hand coner of UI. Has file count, time and size.
> 
> Best you can do is divide the total time of selected by selected file count.

That gives you an average-result that does not make really sense.

For instance:  
If you have 10 files that have a length of 5 minutes und ten songs that have a length of 2 minutes you get 3,5 minutes as average result for a song despite the fact that you oown no song of this length and even no song that comes near this.

---

<div class="post-metadata">

### Author: ![Zerow](https://community.mp3tag.de/user_avatar/community.mp3tag.de/zerow/32/11379_2.png) [@Zerow](https://community.mp3tag.de/u/Zerow)
#### Post date: [July 18, 2017, 11:31am UTC](https://community.mp3tag.de/t/average-file-time/19158/6 "2017-07-18T11:31:54Z")

</div>

> [@stevehero](#):
>
> Lower right hand coner of UI. Has file count, time and size.
> 
> Best you can do is divide the total time of selected by selected file count.

How stupid am I not to realize this on my own? Thanks

**[(days x 24 + hours) x 60 minutes x 60 seconds] / number of files**

And the answer is: 162 seconds

2:42- hmmm, how interesting and valuable that piece of information that is...

---

<div class="post-metadata">

### Author: ![Zerow](https://community.mp3tag.de/user_avatar/community.mp3tag.de/zerow/32/11379_2.png) [@Zerow](https://community.mp3tag.de/u/Zerow)
#### Post date: [July 18, 2017, 6:24pm UTC](https://community.mp3tag.de/t/average-file-time/19158/7 "2017-07-18T18:24:37Z")

</div>

> [@poster](#):
>
> That gives you an average-result that does not make really sense.
> 
> For instance:  
> If you have 10 files that have a length of 5 minutes und ten songs that have a length of 2 minutes you get 3,5 minutes as average result for a song despite the fact that you oown no song of this length and even no song that comes near this.

My math teacher in high school used to said: "I have drunk 1 liter of vodka and you have drank zero. So, on average we both have drank 0.5 liter, right?" So of course on small scale it does not make any sense. But it does with thousands of objects

And I was not trying to know what is the average length of songs in history of mankind. And even if, then what- I you should then take into consideration that fist vinyl records could not hold more than 3 minutes or so? And do what with that issue? And what about all those club and album / extened mixes- count them in or out?

I just wanted to know what I have. But later on I realized I should take out of equation files from albums that are scores and OST [as the also may contain non-songs]. And also take out songs that have smooth transition [and I keep them as a single file]. And also leave out tracks that I do not keep in 100% [if I like only a guitar solo from a breakdown then I keep only the solo and not the whole song]. And so, the second time I ended up with 4:14

---

<div class="post-metadata">

### Author: ![system](https://community.mp3tag.de/uploads/default/original/2X/c/ce7035d426cb755a7916793326d23b465222a407.png) [@system](https://community.mp3tag.de/u/system)
#### Post date: [February 9, 2026, 12:26pm UTC](https://community.mp3tag.de/t/average-file-time/19158/8 "2026-02-09T12:26:54Z")

</div>


