Carve the pumpkin and don the Trump mask! Philadelphia is the top city in the nation for trick-or-treating, declared a real estate database company.

Each year, the Zillow Group crunches the numbers to determine which cities are best for sweet-toothed children and adults on Halloween.

Philadelphia captured the top honor this year, according to Zillow Porchlight, a website operated by the company.

The company looks at home values, crime rates and the child population of cities to determine which is best for the annual candython.

The company’s algorithm computes where kids can safely reap the most candy in the least amount of time.

San Jose, San Francisco, Milwaukee and Los Angeles round out the top five of the best cities for ghosts and goblins.