Computational imaging methods empower modern microscopes to produce high-resolution, large field-of-view, aberration-free images. Fourier ptychographic microscopy can increase the space-bandwidth product of conventional microscopy, but its iterative reconstruction methods are prone to parameter selection and tend to fail under excessive aberrations. Spatial Kramers–Kronig methods can analytically reconstruct complex fields, but is limited by aberration or providing extended resolution enhancement. Here, we present APIC, a closed-form method that weds the strengths of both methods while using only NA-matching and darkfield measurements. We establish an analytical phase retrieval framework which demonstrates the feasibility of analytically reconstructing the complex field associated with darkfield measurements. APIC can retrieve complex aberrations of an imaging system with no additional hardware and avoids iterative algorithms, requiring no human-designed convergence metrics while always obtaining a closed-form complex field solution. We experimentally demonstrate that APIC gives correct reconstruction results where Fourier ptychographic microscopy fails when constrained to the same number of measurements. APIC achieves 2.8 times faster computation using image tile size of 256 (length-wise), is robust against aberrations compared to Fourier ptychographic microscopy, and capable of addressing aberrations whose maximal phase difference exceeds 3.8π when using a NA 0.25 objective in experiment.