If you took your sd card out before formatting the 3ds, you can put it back in and use the homebrew app Faketik to make everything reappear. If your 3ds isn't homebrewed, use 3ds.hacks.guide .
If you didn't take the sd card out before formatting, all data was deleted.
You won't have your nnid, anything stored on the system(some dsiware I believe, photos, and a few other things), but all your games and save data should be back.