The magnetic stray field is an unavoidable consequence of ferromagnetic devices and sensors leading to a natural asymmetry in magnetic properties. Such asymmetry is particularly undesirable for magnetic random access memory applications where the free layer can exhibit bias. Using atomistic dipole-dipole calculations we numerically simulate the stray magnetic field emanating from the magnetic layers of a magnetic memory device with different geometries. We find that edge effects dominate the overall stray magnetic field in patterned devices and that a conventional synthetic antiferromagnet structure is only partially able to compensate the field at the free layer position. A granular reference layer is seen to provide near-field flux closure while additional patterning defects add significant complexity to the stray field in nanoscale devices. Finally we find that the stray field from a nanoscale antiferromagnet is surprisingly non-zero arising from the imperfect cancellation of magnetic sublattices due to edge defects. Our findings provide an outline of the role of different layer structures and defects in the effective stray magnetic field in nanoscale magnetic random access memory devices and atomistic calculations provide a useful tools to study the stray field effects arising from a wide range of defects.