The calculated distance (air line) between San Francisco and Madera is approximately 141 miles respectively 227 kilometers.
By car or train, the actual journey to Madera is certainly longer, as only the direct route (as the crow flies) between San Francisco and Madera has been calculated here.
Air line (approximately)
227 kilometers
123 nautical miles