The 95-year-old monarch returned from hospital at lunchtime on Thursday, the palace said.
The Queen was said to be "disappointed" after cancelling a visit to Northern Ireland on Wednesday.
She was given medical advice to rest for a few days, after a busy schedule of public engagements.
In a statement on Thursday night, Buckingham Palace said: "Following medical advice to rest for a few days, the Queen attended hospital on Wednesday afternoon for some preliminary investigations, returning to Windsor Castle at lunchtime today, and remains in good spirits."