Background Physicians radiologically estimate the reduction in bone strength based on the size or location of bone tumors. The goal of this study was to clarify the relationship between the size or location of a bony defect and its mechanical strength using a computed tomography-based three-dimensional finite element method. Methods Computed tomography data of the right femur from two volunteers (one healthy male and one female patient with primary osteoporosis) were used for the present study. A spherical defect of various sizes and locations at the level of the isthmus of the femoral shaft was created on the three-dimensional finite element models to simulate the osteolytic bone tumor. We classified these defects into three types: inner erosion, cortical disruption, and outer erosion. Two types of mechanical testing were performed: axial compression and torsion. Results In the axial compression testing of the healthy male subject, the correlation coefficients between the defect rate and the failure load in the cortical disruption type, inner erosion type, and outer erosion type were −0.916, −0.358, and −0.106, respectively. In the torsion testing, they were −0.8744, −0.9001, and −0.8907, respectively. In the axial compression testing of the osteoporotic female subject, the correlation coefficients in the cortical disruption type, inner erosion type, and outer erosion type were −0.754, −0.621, and −0.158, respectively. In the torsion testing, they were −0.9199, −0.5098, and −0.8363, respectively. In both tests, the defect rate of the cortex increased and the bone strength decreased, especially in the cortical disruption type. Conclusion The results of the present study demonstrate that osteolytic bone tumors can weaken the bone strength, particularly when perforation of the cortex occurs via tumor invasion. These results may be useful for risk assessment of pathological fractures due to primary and metastatic osteolytic bone tumors in clinical practice.