Data set is taken from Kaggle. A training data of 41932 is taken of handwritten digits which are fed to a neural network which is implemented in MATLAB. It is a 3 layer model with input layer of 784 and hidden layer of 400 and output layer of 10. Test set accuracy and Training set accuracy is found and parameters such as regularization is made fit to give the best results.