The robbery was captured on surveillance video.
Jacob Hardy, of Elkton, Maryland, was arrested at his home.
The robbery happened at the Dunkin' Donuts on Elkton Road in Newark on Wednesday morning.
Police say Hardy placed an order and, when the clerk had the register open, pulled out a gun and demanded cash.
After obtaining an undisclosed amount of money, Hardy then allegedly fled the store.
He is being held by authorities in Maryland pending extradition to Delaware.