Factory resetting a Galaxy Tab 3
I suggest to back up your data first if it has not been done. The standard way of resetting a Samsung Tab 3 tablet to factory is this:


From the Home screen touch Apps.
Touch Settings.
Touch the Accounts tab.
Touch Back up and reset.
Touch Factory data reset
Touch Reset device.
Touch Erase everything.


Please be advised that this erases everything on the tablet. Including history, documents, passwords, etc. Do not do this before making a backup if you have sensitive data on the tablet. Also, this will probably be different if you installed a custom OS. Refer to the documentation for said OS in that case. 

Source: How do I perform a factory reset on my Samsung Galaxy Tab 3?