In my talk I will present a model-independent analysis of the magnetic and electric dipole moments of the muon and electron. The expressions for the dipole moments are given in terms of operator coefficients of the low-energy effective field theory (LEFT) and the Standard Model effective field theory (SMEFT). One-loop renormalization group improved perturbation theory, including the one-loop matching from SMEFT onto LEFT as well as one-loop lepton matrix elements of the effective-theory operators have been used. Semileptonic four-fermion operators involving light quarks give sizable non-perturbative contributions to the dipole moments, which are included in the analysis. Interestingly only a very limited set of the SMEFT operators is able to generate the current deviation of the magnetic moment of the muon from its Standard Model expectation.