how can I install windows 8.1 without losing data

USAFRet

Titan
Moderator
By saving your data elsewhere first.
Any major software or hardware change brings the possibility of losing whatever is on the drive.

This also depends on what you are upgrading from. Windows 7? You can probably, if you click the right boxes, keep everything.
XP or Vista? No.

In either case, have your personal data backed up elsewhere and off line.