If you want it to completely cover your overhead door trim you ll have to measure from the top of that down instead of just inside the door.
Interior barn door opening overlap detail.
Barn door measuring guide for door openings with casing molding.
The final option is bypass doors.
The determining factor in how high or how wide you want to go is just how much you want your sliding door to overlap with the opening.
Measure from outside to outside of casing molding.
This means on one side of the door opening or the other there should be at least 2 8 and perhaps a little more to ensure all the hardware can fit properly.
To have privacy the door usually overlaps the opening by an inch so that a 2 6 opening will require a 2 8 door.
Add 1 to 2 per door for overlap depending on privacy needs.
In this application the doors overlap and slide over one another so that half of the opening is accessible at any time.
Measure across for the width and from the top of the casing molding to the floor for height.
You will cut your slats exactly the height of your opening minus whatever clearance you want the door to have above the floor i wanted mine to have 1 2 inch between the floor and the door.
First make sure that the header space over the opening can support the weight of the hanging barn door.