Depending on your mobo/CPU you may have better answers than VirtualBox (nothing wrong with VirtualBox).
See:
Windows 7 and 64-Bit Virtualization | Windows 7 and 64-Bit Virtualization | Pearson IT Certification
and:
https://blogs.technet.microsoft.com/...-on-windows-7/
Mac
PS: As SAAB has said, XP is very insecure now unless it is completely isolated from the WWW - funnily enough, if your software will run on it, you may be safer with Win98 SE! There is an excellent UNOFFICIAL service pack available at:
http://www.htasoft.com/u98sesp/ that is worth installing.