I'll second that - it's not the designer's responsibility to work out the imposition. In fact, many printers hate when designers even try, because it invariably messes up their own software.
If you have to plan it yourself, though, here's a tip. Add one to the number of pages in your document (40 pages + 1 = 41). Each spread should now add up to that total, alternating between the high & low page numbers. So, your first spread will be page 40 and page 1. Next, page 2 & 39 (2+39 = 41). Then, 38 & 3, 4 & 37, 36 & 5, etc.