Functions to calculate the visible width / height at a given z-depth from a perspective camera

Maybe I can use a similar technique to figure out which plane (at which depth) that sizing matches with physical pixels on the screen? Basically this question: How do we size something using screen pixels?