The calculated distance (air line) between Cardiff and Dinas Powys is approximately 3 miles respectively 6 kilometers.
By car or train, the actual journey to Dinas Powys is certainly longer, as only the direct route (as the crow flies) between Cardiff and Dinas Powys has been calculated here.
Air line (approximately)
6 kilometers
3 nautical miles