It is used when both words are hyphenated (in the BrE style used in the company I proofread for).
I have travelled in both a two- and three-seater aircraft.
I hope to buy a two-, three- or four-bedroomed house.
Bizarrely, his essay was both well- and badly-written.
Are you home- or office-based?
Student or Learner