The understanding and calculation of spin transport are essential elements for the development of spintronics devices. Here, we propose a simple method to calculate analytically the spin accumulations, spin currents and magnetoresistances in complex systems. This can be used both for CPP experiments in multilayers and for multiterminal nanostructures made of semiconductors, oxides, metals and carbon allotropes.