[Solved]Calculating Depth Values

When it comes to the depth buffer, this website is often linked to me: https://www.sjbaker.org/steve/omniv/love_your_z_buffer.html

It contains a Z calculator, for which you can input your Far and Near plane values, the Z distance for this fragment (in between the 2), the number of bits, and it calculates a result.

I am hoping someone can confirm I’m understanding them correctly before I start using them - if I put in Z distance = 1000, with far also = 1000, I get 16777215
With 1<<24 (from the formula) = 16777216, does this mean to get correct values I just have to normalize to get them into the 0-1 range?

I ask as I want to load a texture and use that as a sort of pre-computed depth buffer.

EDIT: well it seems they are calculating them as relative to the max, so simple to normalize.