England were 429 for six in their second innings at stumps on the fourth day, a lead of 295 runs, despite having been outplayed for much of this match, the first of a two-Test series.
Cook was 153 not out -- his fourth and highest Test century at Lord's -- after Stokes had struck a truly thrilling hundred against the country of his birth in just 85 balls, including 15 fours and three sixes.
West Indies, inspired by Gordon Greenidge's double century posted 344 for one in 1984, while England have twice done it against New Zealand, with 282 for three in 2004 and 218 for three in 1965.
England were in trouble when they lost Ian Bell, caught behind off a Tim Southee outswinger, to Sunday's third ball without adding to their overnight score to be 74 for three.
But Cook, whose century saw him extend his England Test record to 27, shared partnerships of 158 and 132 with Joe Root (84) and Stokes (101) respectively.
Earlier, left-handed opener Cook scored his second hundred in as many Tests after he ended a near two-year-wait for a Test ton with 105 against the West Indies in Barbados earlier this month.
It was also his first ton on home soil since his 130 against New Zealand at Headingley in 2013 and saw the 30-year-old Cook extend his England record for Test centuries to 27.
